Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 37358ed

Browse files
author
Mike McLaughlin
authored
Revert "Change just-in-time debugging registry keys. (#15722)" (#15921)
This reverts commit 8b2cac9.
1 parent f1c7328 commit 37358ed

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

src/ToolBox/superpmi/superpmi/jitdebugger.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ BOOL IsCurrentModuleFileNameInAutoExclusionList()
193193
{
194194
HKEY hKeyHolder;
195195

196-
// Look for "HKLM\\SOFTWARE\\Microsoft\\.NETCore\\JITDebugging\\AutoExclusionList"
196+
// Look for "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\AutoExclusionList"
197197
DWORD ret = WszRegOpenKeyEx(HKEY_LOCAL_MACHINE, kUnmanagedDebuggerAutoExclusionListKey, 0, KEY_READ, &hKeyHolder);
198198

199199
if (ret != ERROR_SUCCESS)
@@ -277,15 +277,15 @@ HRESULT GetDebuggerSettingInfoWorker(__out_ecount_part_opt(*pcchDebuggerString,
277277

278278
HKEY hKey;
279279

280-
// Look for "HKLM\\SOFTWARE\\Microsoft\\.NETCore\\JITDebugging"
280+
// Look for "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug"
281281
DWORD ret = WszRegOpenKeyEx(HKEY_LOCAL_MACHINE, kUnmanagedDebuggerKey, 0, KEY_READ, &hKey);
282282

283283
if (ret != ERROR_SUCCESS)
284-
{ // Wow, there's not even an JITDebugging hive, so no native debugger, no auto.
284+
{ // Wow, there's not even an AeDebug hive, so no native debugger, no auto.
285285
return S_OK;
286286
}
287287

288-
// Look in JITDebugging key for "Debugger"; get the size of any value stored there.
288+
// Look in AeDebug key for "Debugger"; get the size of any value stored there.
289289
DWORD valueType, valueSize;
290290
ret = RegQueryValueExW(hKey, kUnmanagedDebuggerValue, 0, &valueType, 0, &valueSize);
291291

@@ -337,7 +337,7 @@ HRESULT GetDebuggerSettingInfoWorker(__out_ecount_part_opt(*pcchDebuggerString,
337337
}
338338
else
339339
{
340-
// Look in JITDebugging key for "Auto"; get the size of any value stored there.
340+
// Look in AeDebug key for "Auto"; get the size of any value stored there.
341341
ret = RegQueryValueExW(hKey, kUnmanagedDebuggerAutoValue, 0, &valueType, 0, &valueSize);
342342
if ((ret == ERROR_SUCCESS) && (valueType == REG_SZ) && (valueSize / sizeof(WCHAR) < MAX_PATH))
343343
{

src/inc/utilcode.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4248,16 +4248,10 @@ void AdjustImageRuntimeVersion (SString* pVersion);
42484248
SELECTANY const WCHAR kDebugApplicationsPoliciesKey[] = W("SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Error Reporting\\DebugApplications");
42494249
SELECTANY const WCHAR kDebugApplicationsKey[] = W("SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\DebugApplications");
42504250

4251-
#ifdef FEATURE_CORECLR
4252-
SELECTANY const WCHAR kUnmanagedDebuggerKey[] = W("SOFTWARE\\Microsoft\\.NETCore\\JITDebugging");
4253-
SELECTANY const WCHAR kUnmanagedDebuggerAutoExclusionListKey[] = W("SOFTWARE\\Microsoft\\.NETCore\\JITDebugging\\AutoExclusionList");
4254-
#else
42554251
SELECTANY const WCHAR kUnmanagedDebuggerKey[] = W("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug");
4256-
SELECTANY const WCHAR kUnmanagedDebuggerAutoExclusionListKey[] = W("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\AutoExclusionList");
4257-
#endif // FEATURE_CORECLR
4258-
42594252
SELECTANY const WCHAR kUnmanagedDebuggerValue[] = W("Debugger");
42604253
SELECTANY const WCHAR kUnmanagedDebuggerAutoValue[] = W("Auto");
4254+
SELECTANY const WCHAR kUnmanagedDebuggerAutoExclusionListKey[] = W("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\AutoExclusionList");
42614255

42624256
BOOL GetRegistryLongValue(HKEY hKeyParent, // Parent key.
42634257
LPCWSTR szKey, // Key name to look at.

src/utilcode/util_nodependencies.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ BOOL IsCurrentModuleFileNameInAutoExclusionList()
353353

354354
HKEYHolder hKeyHolder;
355355

356-
// Look for "HKLM\\SOFTWARE\\Microsoft\\.NETCore\\JITDebugging\\AutoExclusionList"
356+
// Look for "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\AutoExclusionList"
357357
DWORD ret = WszRegOpenKeyEx(HKEY_LOCAL_MACHINE, kUnmanagedDebuggerAutoExclusionListKey, 0, KEY_READ, &hKeyHolder);
358358

359359
if (ret != ERROR_SUCCESS)
@@ -484,15 +484,15 @@ HRESULT GetDebuggerSettingInfoWorker(__out_ecount_part_opt(*pcchDebuggerString,
484484

485485
HKEYHolder hKeyHolder;
486486

487-
// Look for "HKLM\\SOFTWARE\\Microsoft\\.NETCore\\JITDebugging"
487+
// Look for "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug"
488488
DWORD ret = WszRegOpenKeyEx(HKEY_LOCAL_MACHINE, kUnmanagedDebuggerKey, 0, KEY_READ, &hKeyHolder);
489489

490490
if (ret != ERROR_SUCCESS)
491-
{ // Wow, there's not even an JITDebugging hive, so no native debugger, no auto.
491+
{ // Wow, there's not even an AeDebug hive, so no native debugger, no auto.
492492
return S_OK;
493493
}
494494

495-
// Look in JITDebugging key for "Debugger"; get the size of any value stored there.
495+
// Look in AeDebug key for "Debugger"; get the size of any value stored there.
496496
DWORD valueType, valueSize = 0;
497497
ret = WszRegQueryValueEx(hKeyHolder, kUnmanagedDebuggerValue, 0, &valueType, 0, &valueSize);
498498

@@ -547,7 +547,7 @@ HRESULT GetDebuggerSettingInfoWorker(__out_ecount_part_opt(*pcchDebuggerString,
547547
}
548548
else
549549
{
550-
// Look in JITDebugging key for "Auto"; get the size of any value stored there.
550+
// Look in AeDebug key for "Auto"; get the size of any value stored there.
551551
ret = WszRegQueryValueEx(hKeyHolder, kUnmanagedDebuggerAutoValue, 0, &valueType, 0, &valueSize);
552552
if ((ret == ERROR_SUCCESS) && (valueType == REG_SZ) && (valueSize / sizeof(WCHAR) < MAX_LONGPATH))
553553
{

0 commit comments

Comments
 (0)