diff options
author | Mike McLaughlin <mikem@microsoft.com> | 2015-06-19 17:37:48 -0700 |
---|---|---|
committer | Mike McLaughlin <mikem@microsoft.com> | 2015-06-24 11:50:04 -0700 |
commit | 556224275d2f7701b3ea25e35f6873afd5c462ca (patch) | |
tree | 61cb66f9bc79c62b5edd1f81d3fc90b7eb633d8f /src/debug/di | |
parent | 8c70800b5e8dc5535c379dec4a6fb32f7ab5e878 (diff) | |
download | coreclr-556224275d2f7701b3ea25e35f6873afd5c462ca.tar.gz coreclr-556224275d2f7701b3ea25e35f6873afd5c462ca.tar.bz2 coreclr-556224275d2f7701b3ea25e35f6873afd5c462ca.zip |
Fixed the PAL_Initialize* order problem.
Now it doesn't matter if PAL_InitializeDLL (which doesn't pass argc/argv) is called before PAL_InitializeCoreCLR or vice-versa. The exe path and command line are updated for every PAL_Initialize or PAL_InitializeCoreCLR call.
Cleaned up the pal_module initialization to get and set the module name removing the need for PAL_InitializeCoreCLR to pass the coreclr path. This required changing the process attach DllInit to be done more on demand.
The signature for PAL_InitializeCoreCLR has changed to (two parameters removed):
PALIMPORT
DWORD
PALAPI
PAL_InitializeCoreCLR(
const char *szExePath);
Fixed a problem in the ClrStack -i command where the SP/PC displayed wasn't correctly.
Diffstat (limited to 'src/debug/di')
-rw-r--r-- | src/debug/di/shimremotedatatarget.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/debug/di/shimremotedatatarget.cpp b/src/debug/di/shimremotedatatarget.cpp index cf60e226b7..c6036f6324 100644 --- a/src/debug/di/shimremotedatatarget.cpp +++ b/src/debug/di/shimremotedatatarget.cpp @@ -281,12 +281,27 @@ ShimRemoteDataTarget::GetThreadContext( BYTE * pContext) { ReturnFailureIfStateNotOk(); - + +#ifdef FEATURE_DBGIPC_TRANSPORT_DI + // GetThreadContext() is currently not implemented in ShimRemoteDataTarget, which is used with our pipe transport + // (FEATURE_DBGIPC_TRANSPORT_DI). Pipe transport is used on POSIX system, but occasionally we can turn it on for Windows for testing, + // and then we'd like to have same behavior as on POSIX system (zero context). + // + // We don't have a good way to implement GetThreadContext() in ShimRemoteDataTarget yet, because we have no way to convert a thread ID to a + // thread handle. The function to do the conversion is OpenThread(), which is not implemented in PAL. Even if we had a handle, PAL implementation + // of GetThreadContext() is very limited and doesn't work when we're not attached with ptrace. + // Instead, we just zero out the seed CONTEXT for the stackwalk. This tells the stackwalker to + // start the stackwalk with the first explicit frame. This won't work when we do native debugging, + // but that won't happen on the POSIX systems since they don't support native debugging. + ZeroMemory(pContext, contextSize); + return S_OK; +#else // ICorDebugDataTarget::GetThreadContext() and ICorDebugDataTarget::SetThreadContext() are currently only // required for interop-debugging and inspection of floating point registers, both of which are not // implemented on Mac. _ASSERTE(!"The remote data target doesn't know how to get a thread's CONTEXT."); return E_NOTIMPL; +#endif // DFEATURE_DBGIPC_TRANSPORT_DI } // impl of interface method ICorDebugMutableDataTarget::SetThreadContext |