Skip to content

Commit 64b9459

Browse files
committed
Revert "Make UCO MethodDesc globals DAC-accessible"
This reverts commit e2d4338.
1 parent 67cbaf4 commit 64b9459

File tree

14 files changed

+17
-55
lines changed

14 files changed

+17
-55
lines changed

src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,6 @@ HRESULT STDMETHODCALLTYPE DacDbiInterfaceImpl::UnwindStackWalkFrame(StackWalkHan
307307
continue;
308308
}
309309

310-
// Runtime-invoked UCO entrypoint methods (Environment.CallEntryPoint, Thread.StartCallback, GC.RunFinalizers)
311-
if (pMD == g_pEnvironmentCallEntryPointMethodDesc || pMD == g_pThreadStartCallbackMethodDesc || pMD == g_pGCRunFinalizersMethodDesc)
312-
{
313-
continue;
314-
}
315-
316310
fIsAtEndOfStack = FALSE;
317311
}
318312
else
@@ -427,11 +421,6 @@ HRESULT STDMETHODCALLTYPE DacDbiInterfaceImpl::GetStackWalkCurrentFrameInfo(Stac
427421
{
428422
ftResult = kManagedExceptionHandlingCodeFrame;
429423
}
430-
// Runtime-invoked UCO entrypoint methods
431-
else if (pMD == g_pEnvironmentCallEntryPointMethodDesc || pMD == g_pThreadStartCallbackMethodDesc || pMD == g_pGCRunFinalizersMethodDesc)
432-
{
433-
ftResult = kRuntimeEntryPointFrame;
434-
}
435424
else
436425
{
437426
ftResult = kManagedStackFrame;

src/coreclr/debug/di/rsstackwalk.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,6 @@ HRESULT CordbStackWalk::GetFrameWorker(ICorDebugFrame ** ppFrame)
602602
STRESS_LOG1(LF_CORDB, LL_INFO1000, "CSW::GFW - managed exception handling code frame (%p)", this);
603603
return S_FALSE;
604604
}
605-
else if (ft == IDacDbiInterface::kRuntimeEntryPointFrame)
606-
{
607-
STRESS_LOG1(LF_CORDB, LL_INFO1000, "CSW::GFW - runtime entry point frame (%p)", this);
608-
return S_FALSE;
609-
}
610605
else if (ft == IDacDbiInterface::kExplicitFrame)
611606
{
612607
STRESS_LOG1(LF_CORDB, LL_INFO1000, "CSW::GFW - explicit frame (%p)", this);

src/coreclr/debug/ee/controller.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6775,14 +6775,6 @@ bool DebuggerStepper::IsInterestingFrame(FrameInfo * pFrame)
67756775
{
67766776
return false;
67776777
}
6778-
6779-
// Ignore runtime-invoked UCO entrypoint methods
6780-
if (pFrame->md == g_pEnvironmentCallEntryPointMethodDesc ||
6781-
pFrame->md == g_pThreadStartCallbackMethodDesc ||
6782-
pFrame->md == g_pGCRunFinalizersMethodDesc)
6783-
{
6784-
return false;
6785-
}
67866778
}
67876779

67886780
return true;

src/coreclr/debug/inc/dacdbiinterface.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,6 @@ IDacDbiInterface : public IUnknown
12311231
kNativeStackFrame,
12321232
kNativeRuntimeUnwindableStackFrame,
12331233
kManagedExceptionHandlingCodeFrame,
1234-
kRuntimeEntryPointFrame,
12351234
kAtEndOfStack,
12361235
} FrameType;
12371236

src/coreclr/inc/dacvars.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pEHClass, ::g_pEHClass)
125125
DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pExceptionServicesInternalCallsClass, ::g_pExceptionServicesInternalCallsClass)
126126
DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pStackFrameIteratorClass, ::g_pStackFrameIteratorClass)
127127

128-
DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pEnvironmentCallEntryPointMethodDesc, ::g_pEnvironmentCallEntryPointMethodDesc)
129-
DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pThreadStartCallbackMethodDesc, ::g_pThreadStartCallbackMethodDesc)
130-
DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pGCRunFinalizersMethodDesc, ::g_pGCRunFinalizersMethodDesc)
131-
132128
DEFINE_DACVAR(PTR_SString, SString__s_Empty, SString::s_Empty)
133129

134130
DEFINE_DACVAR(INT32, ArrayBase__s_arrayBoundsZero, ArrayBase::s_arrayBoundsZero)

src/coreclr/vm/assembly.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,8 @@ struct Param
11651165
bool captureException;
11661166
} param;
11671167

1168+
MethodDesc* g_pEnvironmentCallEntryPointMethodDesc = nullptr;
1169+
11681170
#if defined(TARGET_BROWSER)
11691171
extern "C" void SystemJS_ResolveMainPromise(int exitCode);
11701172
#endif // TARGET_BROWSER

src/coreclr/vm/comsynchronizable.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include "utilcode.h"
3232
#endif
3333

34+
MethodDesc* g_pThreadStartCallbackMethodDesc = nullptr;
35+
3436

3537
// For the following helpers, we make no attempt to synchronize. The app developer
3638
// is responsible for managing their own race conditions.

src/coreclr/vm/debugdebugger.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
#ifndef DACCESS_COMPILE
3434

35+
extern MethodDesc* g_pEnvironmentCallEntryPointMethodDesc;
36+
3537
//
3638
// Notes:
3739
// If a managed debugger is attached, this should send the managed UserBreak event.
@@ -193,9 +195,7 @@ static StackWalkAction GetStackFramesCallback(CrawlFrame* pCf, VOID* data)
193195
// because we asked the stackwalker for it!
194196
MethodDesc* pFunc = pCf->GetFunction();
195197

196-
if (pFunc != nullptr && (pFunc == g_pEnvironmentCallEntryPointMethodDesc ||
197-
pFunc == g_pThreadStartCallbackMethodDesc ||
198-
pFunc == g_pGCRunFinalizersMethodDesc))
198+
if (pFunc != nullptr && pFunc == g_pEnvironmentCallEntryPointMethodDesc)
199199
{
200200
return SWA_CONTINUE;
201201
}

src/coreclr/vm/eepolicy.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include "eventtrace.h"
2424
#undef ExitProcess
2525

26+
extern MethodDesc* g_pEnvironmentCallEntryPointMethodDesc;
27+
2628
void SafeExitProcess(UINT exitCode, ShutdownCompleteAction sca = SCA_ExitProcessWhenShutdownComplete)
2729
{
2830
STRESS_LOG2(LF_SYNC, LL_INFO10, "SafeExitProcess: exitCode = %d sca = %d\n", exitCode, sca);
@@ -178,11 +180,9 @@ class CallStackLogger
178180

179181
MethodDesc* pMD = pCF->GetFunction();
180182

181-
// Skip runtime-invoked UCO entrypoint methods so they don't appear in
183+
// Skip Environment.CallEntryPoint so it doesn't appear in vanilla
182184
// unhandled exception experiences.
183-
if (pMD != nullptr && (pMD == g_pEnvironmentCallEntryPointMethodDesc ||
184-
pMD == g_pThreadStartCallbackMethodDesc ||
185-
pMD == g_pGCRunFinalizersMethodDesc))
185+
if (pMD != nullptr && pMD == g_pEnvironmentCallEntryPointMethodDesc)
186186
{
187187
return SWA_CONTINUE;
188188
}

src/coreclr/vm/exceptionhandling.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#include "exinfo.h"
1919
#include "configuration.h"
2020

21+
extern MethodDesc* g_pEnvironmentCallEntryPointMethodDesc;
22+
extern MethodDesc* g_pThreadStartCallbackMethodDesc;
23+
extern MethodDesc* g_pGCRunFinalizersMethodDesc;
24+
2125
#if defined(TARGET_X86)
2226
#define USE_CURRENT_CONTEXT_IN_FILTER
2327
#endif // TARGET_X86

0 commit comments

Comments
 (0)