diff options
author | Mike McLaughlin <mikem@microsoft.com> | 2015-11-19 18:13:25 -0800 |
---|---|---|
committer | Mike McLaughlin <mikem@microsoft.com> | 2015-12-02 16:07:18 -0800 |
commit | aa78a2773ffe573c705caa11dd66467ae6c82781 (patch) | |
tree | 8da63f171dcf97bbdb796a3b961d53b40be00d65 /src/pal/src/exception/seh-unwind.cpp | |
parent | b3a45c0a4db6989f9ba6e4cc9db849d0558e961f (diff) | |
download | coreclr-aa78a2773ffe573c705caa11dd66467ae6c82781.tar.gz coreclr-aa78a2773ffe573c705caa11dd66467ae6c82781.tar.bz2 coreclr-aa78a2773ffe573c705caa11dd66467ae6c82781.zip |
Some SOS fixes/cleanup (bpmd, setclrpath, setsostid).
Enable the module load notification when no module or methods are found.
setclrpath/setsostid print the current path/tid if no arguments. "setsostid -clear"
now clears the tid/os id mapping.
Added better exception hook to sos plugin to catch special CLRN exception. Before
multiple lldb "Exception breakpoints" where set each time bpmd added a new bp. Added
a "DoNotDeleteOrDisable" message to the exception breakpoint created.
Fix bpmd on release builds. RtlpRaiseException was being inlined and the ExceptionRecord
parameter was being optimized away causing the GetLastEventInformation api to failed
and the special CLRN exception to be ignored.
Add sos help support. "soshelp" displays help about a command.
Diffstat (limited to 'src/pal/src/exception/seh-unwind.cpp')
-rw-r--r-- | src/pal/src/exception/seh-unwind.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp index f0749e7b29..dde7ba87fc 100644 --- a/src/pal/src/exception/seh-unwind.cpp +++ b/src/pal/src/exception/seh-unwind.cpp @@ -556,9 +556,16 @@ Note: The name of this function and the name of the ExceptionRecord parameter is used in the sos lldb plugin code to read the exception record. See coreclr\src\ToolBox\SOS\lldbplugin\debugclient.cpp. + + This function must not be inlined or optimized so the below PAL_VirtualUnwind + calls end up with RaiseException caller's context and so the above debugger + code finds the function and ExceptionRecord parameter. --*/ PAL_NORETURN -static void RtlpRaiseException(EXCEPTION_RECORD *ExceptionRecord) +__attribute__((noinline)) +__attribute__((optnone)) +static void +RtlpRaiseException(EXCEPTION_RECORD *ExceptionRecord) { // Capture the context of RtlpRaiseException. CONTEXT ContextRecord; @@ -572,6 +579,7 @@ static void RtlpRaiseException(EXCEPTION_RECORD *ExceptionRecord) // The frame we're looking at now is RaiseException. We have to unwind one // level further to get the actual context user code could be resumed at. PAL_VirtualUnwind(&ContextRecord, NULL); + #if defined(_X86_) ExceptionRecord->ExceptionAddress = (void *) ContextRecord.Eip; #elif defined(_AMD64_) @@ -582,19 +590,7 @@ static void RtlpRaiseException(EXCEPTION_RECORD *ExceptionRecord) #error unsupported architecture #endif - EXCEPTION_POINTERS pointers; - pointers.ExceptionRecord = ExceptionRecord; - pointers.ContextRecord = &ContextRecord; - - SEHRaiseException(InternalGetCurrentThread(), &pointers, 0); -} - -PAL_NORETURN -void SEHRaiseException(CPalThread *pthrCurrent, - PEXCEPTION_POINTERS lpExceptionPointers, - int signal_code) -{ - throw PAL_SEHException(lpExceptionPointers->ExceptionRecord, lpExceptionPointers->ContextRecord); + throw PAL_SEHException(ExceptionRecord, &ContextRecord); } /*++ |