Skip to content

Commit 4f18d67

Browse files
committed
Cleanups
1 parent b0000d2 commit 4f18d67

File tree

7 files changed

+6
-27
lines changed

7 files changed

+6
-27
lines changed

src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ static void NotifyOfCrossThreadDependencySlow()
6565
[SuppressGCTransition]
6666
private static partial int IsManagedDebuggerAttached();
6767

68-
internal static bool IsAnyDebuggerAttached() => IsAnyDebuggerAttachedInternal() != 0;
69-
70-
[LibraryImport(RuntimeHelpers.QCall, EntryPoint = "DebugDebugger_IsAnyDebuggerAttached")]
71-
[SuppressGCTransition]
72-
private static partial int IsAnyDebuggerAttachedInternal();
73-
7468
// Constants representing the importance level of messages to be logged.
7569
//
7670
// An attached debugger can enable or disable which messages will

src/coreclr/nativeaot/Runtime/MiscHelpers.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,8 @@ EXTERN_C int32_t QCALLTYPE RhpGetCurrentThreadStackTrace(void* pOutputBuffer, ui
395395
return RhpCalculateStackTraceWorker(pOutputBuffer, outputBufferLength, pAddressInCurrentFrame);
396396
}
397397

398-
EXTERN_C UInt32_BOOL QCALLTYPE DebugDebugger_IsAnyDebuggerAttached()
398+
EXTERN_C UInt32_BOOL QCALLTYPE DebugDebugger_IsNativeDebuggerAttached()
399399
{
400-
// Explicitly not checking for a managed debugger; only checking for a native debugger.
401400
return minipal_is_native_debugger_present();
402401
}
403402

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static void Break()
1515
{
1616
#if TARGET_WINDOWS
1717
// IsAttached is always true when IsDebuggerPresent is true, so no need to check for it
18-
if (Debugger.IsAnyDebuggerAttached())
18+
if (Debugger.IsNativeDebuggerAttached())
1919
Debug.DebugBreak();
2020
#else
2121
// UNIXTODO: Implement Debugger.Break
@@ -77,10 +77,9 @@ public static bool IsLogging()
7777
return false;
7878
}
7979

80-
internal static bool IsAnyDebuggerAttached() => IsAnyDebuggerAttachedInternal() != 0;
80+
internal static bool IsNativeDebuggerAttached() => IsNativeDebuggerAttachedInternal() != 0;
8181

82-
[LibraryImport(RuntimeImports.RuntimeLibrary, EntryPoint = "DebugDebugger_IsAnyDebuggerAttached")]
83-
[SuppressGCTransition]
84-
private static partial int IsAnyDebuggerAttachedInternal();
82+
[LibraryImport(RuntimeImports.RuntimeLibrary, EntryPoint = "DebugDebugger_IsNativeDebuggerAttached")]
83+
private static partial int IsNativeDebuggerAttachedInternal();
8584
}
8685
}

src/coreclr/nativeaot/System.Private.CoreLib/src/System/EventReporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public static bool ShouldLogInEventLog
177177
{
178178
get
179179
{
180-
if (Debugger.IsAnyDebuggerAttached())
180+
if (Debugger.IsNativeDebuggerAttached())
181181
return false;
182182

183183
if (s_once == 1 || Interlocked.Exchange(ref s_once, 1) == 1)

src/coreclr/vm/debugdebugger.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -867,17 +867,6 @@ extern "C" BOOL QCALLTYPE DebugDebugger_IsLoggingHelper()
867867
return FALSE;
868868
}
869869

870-
extern "C" BOOL QCALLTYPE DebugDebugger_IsAnyDebuggerAttached()
871-
{
872-
QCALL_CONTRACT_NO_GC_TRANSITION;
873-
874-
#ifdef DEBUGGING_SUPPORTED
875-
return CORDebuggerAttached() || minipal_is_native_debugger_present();
876-
#endif // DEBUGGING_SUPPORTED
877-
878-
return FALSE;
879-
}
880-
881870
extern "C" BOOL QCALLTYPE DebugDebugger_IsManagedDebuggerAttached()
882871
{
883872
QCALL_CONTRACT_NO_GC_TRANSITION;

src/coreclr/vm/debugdebugger.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ extern "C" BOOL QCALLTYPE DebugDebugger_Launch();
1818
extern "C" void QCALLTYPE DebugDebugger_Log(INT32 Level, PCWSTR pwzModule, PCWSTR pwzMessage);
1919
extern "C" void QCALLTYPE DebugDebugger_CustomNotification(QCall::ObjectHandleOnStack data);
2020
extern "C" BOOL QCALLTYPE DebugDebugger_IsLoggingHelper();
21-
extern "C" BOOL QCALLTYPE DebugDebugger_IsAnyDebuggerAttached();
2221
extern "C" BOOL QCALLTYPE DebugDebugger_IsManagedDebuggerAttached();
2322

2423
class StackFrameHelper : public Object

src/coreclr/vm/qcallentrypoints.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ static const Entry s_QCall[] =
9090
DllImportEntry(DebugDebugger_CustomNotification)
9191
DllImportEntry(DebugDebugger_IsLoggingHelper)
9292
DllImportEntry(DebugDebugger_IsManagedDebuggerAttached)
93-
DllImportEntry(DebugDebugger_IsAnyDebuggerAttached)
9493
DllImportEntry(Delegate_BindToMethodName)
9594
DllImportEntry(Delegate_BindToMethodInfo)
9695
DllImportEntry(Delegate_InitializeVirtualCallStub)

0 commit comments

Comments
 (0)