summaryrefslogtreecommitdiff
path: root/src/debug/di/shimprocess.cpp
diff options
context:
space:
mode:
authorEugene <Eugene.Zemtsov@microsoft.com>2015-08-20 21:11:31 -0700
committerEugene Zemtsov <Eugene.Zemtsov@microsoft.com>2015-09-15 13:44:42 -0700
commitd0f71d0b22e9012263e4a078d24738c75e384a90 (patch)
tree0bb4840e2f42e39592bcbe18d0c0c68a4db0f376 /src/debug/di/shimprocess.cpp
parenteb3260e67bc653b56a80fbf0e8a07d78e3a404c1 (diff)
downloadcoreclr-d0f71d0b22e9012263e4a078d24738c75e384a90.tar.gz
coreclr-d0f71d0b22e9012263e4a078d24738c75e384a90.tar.bz2
coreclr-d0f71d0b22e9012263e4a078d24738c75e384a90.zip
Use out-of-proc libunwind to unwind native stack from DAC
Implementation of PAL_VirtualUnwindOutOfProc that uses ptrace libunwind to be able to unwind native stack in debugee. This allows to get valid managed stack for threads that passed HelperMethodFrames.
Diffstat (limited to 'src/debug/di/shimprocess.cpp')
-rw-r--r--src/debug/di/shimprocess.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/debug/di/shimprocess.cpp b/src/debug/di/shimprocess.cpp
index 6e0350b8eb..e4b511abec 100644
--- a/src/debug/di/shimprocess.cpp
+++ b/src/debug/di/shimprocess.cpp
@@ -133,7 +133,9 @@ void ShimProcess::SetProcess(ICorDebugProcess * pProcess)
if (pProcess != NULL)
{
// Verify that DataTarget + new process have the same pid?
- _ASSERTE(m_pProcess->GetPid() == m_pLiveDataTarget->GetPid());
+ DWORD pid = 0;
+ _ASSERTE(SUCCEEDED(m_pLiveDataTarget->GetPid(&pid)));
+ _ASSERTE(m_pProcess->GetPid() == pid);
}
}
@@ -738,7 +740,11 @@ HRESULT ShimProcess::HandleWin32DebugEvent(const DEBUG_EVENT * pEvent)
// This assert could be our only warning of various catastrophic failures in the left-side.
if (!dwFirstChance && (pRecord->ExceptionCode == STATUS_BREAKPOINT) && !m_fIsInteropDebugging)
{
- DWORD pid = (m_pLiveDataTarget == NULL) ? 0 : m_pLiveDataTarget->GetPid();
+ DWORD pid = 0;
+ if (m_pLiveDataTarget != NULL)
+ {
+ m_pLiveDataTarget->GetPid(&pid);
+ }
CONSISTENCY_CHECK_MSGF(false,
("Unhandled breakpoint exception in debuggee (pid=%d (0x%x)) on thread %d(0x%x)\n"
"This may mean there was an assert in the debuggee on that thread.\n"
@@ -1742,7 +1748,11 @@ void ShimProcess::PreDispatchEvent(bool fRealCreateProcessEvent /*= false*/)
CORDB_ADDRESS ShimProcess::GetCLRInstanceBaseAddress()
{
CORDB_ADDRESS baseAddress = CORDB_ADDRESS(NULL);
- DWORD dwPid = m_pLiveDataTarget->GetPid();
+ DWORD dwPid = 0;
+ if (FAILED(m_pLiveDataTarget->GetPid(&dwPid)))
+ {
+ return baseAddress;
+ }
#if defined(FEATURE_CORESYSTEM)
// Debugger attaching to CoreCLR via CoreCLRCreateCordbObject should have already specified CLR module address.
// Code that help to find it now lives in dbgshim.