Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/coreclr/debug/daccess/dacdbiimplstackwalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ HRESULT STDMETHODCALLTYPE DacDbiInterfaceImpl::UnwindStackWalkFrame(StackWalkHan
continue;
}

// Runtime-invoked UCO entrypoint method (Environment.CallEntryPoint)
Comment thread
jkotas marked this conversation as resolved.
Outdated
if (pMD == g_pEnvironmentCallEntryPointMethodDesc)
{
continue;
}

fIsAtEndOfStack = FALSE;
}
else
Expand Down Expand Up @@ -421,6 +427,11 @@ HRESULT STDMETHODCALLTYPE DacDbiInterfaceImpl::GetStackWalkCurrentFrameInfo(Stac
{
ftResult = kManagedExceptionHandlingCodeFrame;
}
// Runtime-invoked UCO entrypoint method (Environment.CallEntryPoint)
Comment thread
jkotas marked this conversation as resolved.
Outdated
else if (pMD == g_pEnvironmentCallEntryPointMethodDesc)
{
ftResult = kRuntimeEntryPointFrame;
}
else
{
ftResult = kManagedStackFrame;
Expand Down
5 changes: 5 additions & 0 deletions src/coreclr/debug/di/rsstackwalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,11 @@ HRESULT CordbStackWalk::GetFrameWorker(ICorDebugFrame ** ppFrame)
STRESS_LOG1(LF_CORDB, LL_INFO1000, "CSW::GFW - managed exception handling code frame (%p)", this);
return S_FALSE;
}
else if (ft == IDacDbiInterface::kRuntimeEntryPointFrame)
{
STRESS_LOG1(LF_CORDB, LL_INFO1000, "CSW::GFW - runtime entry point frame (%p)", this);
return S_FALSE;
}
else if (ft == IDacDbiInterface::kExplicitFrame)
{
STRESS_LOG1(LF_CORDB, LL_INFO1000, "CSW::GFW - explicit frame (%p)", this);
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/debug/ee/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6775,6 +6775,12 @@ bool DebuggerStepper::IsInterestingFrame(FrameInfo * pFrame)
{
return false;
}

// Ignore runtime-invoked UCO entrypoint method (Environment.CallEntryPoint)
Comment thread
jkotas marked this conversation as resolved.
Outdated
if (pFrame->md == g_pEnvironmentCallEntryPointMethodDesc)
{
return false;
}
}

return true;
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/debug/inc/dacdbiinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,7 @@ IDacDbiInterface : public IUnknown
kNativeStackFrame,
kNativeRuntimeUnwindableStackFrame,
kManagedExceptionHandlingCodeFrame,
kRuntimeEntryPointFrame,
kAtEndOfStack,
} FrameType;

Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/inc/dacvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pEHClass, ::g_pEHClass)
DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pExceptionServicesInternalCallsClass, ::g_pExceptionServicesInternalCallsClass)
DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pStackFrameIteratorClass, ::g_pStackFrameIteratorClass)

DEFINE_DACVAR(UNKNOWN_POINTER_TYPE, dac__g_pEnvironmentCallEntryPointMethodDesc, ::g_pEnvironmentCallEntryPointMethodDesc)

DEFINE_DACVAR(PTR_SString, SString__s_Empty, SString::s_Empty)

DEFINE_DACVAR(INT32, ArrayBase__s_arrayBoundsZero, ArrayBase::s_arrayBoundsZero)
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/vm/assembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,6 @@ struct Param
bool captureException;
} param;

MethodDesc* g_pEnvironmentCallEntryPointMethodDesc = nullptr;

#if defined(TARGET_BROWSER)
extern "C" void SystemJS_ResolveMainPromise(int exitCode);
#endif // TARGET_BROWSER
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/vm/debugdebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

#ifndef DACCESS_COMPILE

extern MethodDesc* g_pEnvironmentCallEntryPointMethodDesc;

//
// Notes:
// If a managed debugger is attached, this should send the managed UserBreak event.
Expand Down
4 changes: 1 addition & 3 deletions src/coreclr/vm/eepolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include "eventtrace.h"
#undef ExitProcess

extern MethodDesc* g_pEnvironmentCallEntryPointMethodDesc;

void SafeExitProcess(UINT exitCode, ShutdownCompleteAction sca = SCA_ExitProcessWhenShutdownComplete)
{
STRESS_LOG2(LF_SYNC, LL_INFO10, "SafeExitProcess: exitCode = %d sca = %d\n", exitCode, sca);
Expand Down Expand Up @@ -180,7 +178,7 @@ class CallStackLogger

MethodDesc* pMD = pCF->GetFunction();

// Skip Environment.CallEntryPoint so it doesn't appear in vanilla
// Skip Environment.CallEntryPoint so it doesn't appear in
// unhandled exception experiences.
if (pMD != nullptr && pMD == g_pEnvironmentCallEntryPointMethodDesc)
{
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/vm/exceptionhandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "exinfo.h"
#include "configuration.h"

extern MethodDesc* g_pEnvironmentCallEntryPointMethodDesc;
extern MethodDesc* g_pThreadStartCallbackMethodDesc;
extern MethodDesc* g_pGCRunFinalizersMethodDesc;

Expand Down
8 changes: 8 additions & 0 deletions src/coreclr/vm/proftoeeinterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8065,6 +8065,14 @@ StackWalkAction ProfilerStackWalkCallback(CrawlFrame *pCf, PROFILER_STACK_WALK_D
return SWA_CONTINUE;
}

//
// Skip runtime-invoked UCO entrypoint method (Environment.CallEntryPoint)
Comment thread
jkotas marked this conversation as resolved.
Outdated
//
if (pFunc != NULL && pFunc == g_pEnvironmentCallEntryPointMethodDesc)
{
return SWA_CONTINUE;
}

Comment thread
jkotas marked this conversation as resolved.
Outdated
//
// For Unmanaged-to-managed transitions we get a NativeMarker back, which we want
// to return to the profiler as the context seed if it wants to walk the unmanaged
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/vm/vars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ GPTR_IMPL(MethodTable, g_pEHClass);
GPTR_IMPL(MethodTable, g_pExceptionServicesInternalCallsClass);
GPTR_IMPL(MethodTable, g_pStackFrameIteratorClass);

GPTR_IMPL(MethodDesc, g_pEnvironmentCallEntryPointMethodDesc);

GVAL_IMPL_INIT(PTR_WSTR, g_EntryAssemblyPath, NULL);

#ifndef DACCESS_COMPILE
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/vm/vars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ GPTR_DECL(MethodTable, g_pEHClass);
GPTR_DECL(MethodTable, g_pExceptionServicesInternalCallsClass);
GPTR_DECL(MethodTable, g_pStackFrameIteratorClass);

GPTR_DECL(MethodDesc, g_pEnvironmentCallEntryPointMethodDesc);

// Full path to the managed entry assembly - stored for ease of identifying the entry asssembly for diagnostics
GVAL_DECL(PTR_WSTR, g_EntryAssemblyPath);

Expand Down
Loading