summaryrefslogtreecommitdiff
path: root/src/pal/src/exception/signal.cpp
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2015-04-15 16:59:56 -0700
committerMike McLaughlin <mikem@microsoft.com>2015-04-22 20:42:31 -0700
commitd5012a8471ebf16265951fb199eb58ec6d33116b (patch)
treeb1b67d5cdfb5d12a4963177cc9a1bcde0b0b8fac /src/pal/src/exception/signal.cpp
parent48b911e5fab33b41f3a2021ccd051eb7a99a2fbd (diff)
downloadcoreclr-d5012a8471ebf16265951fb199eb58ec6d33116b.tar.gz
coreclr-d5012a8471ebf16265951fb199eb58ec6d33116b.tar.bz2
coreclr-d5012a8471ebf16265951fb199eb58ec6d33116b.zip
Changed the VM's hardware exception to return if not in manged code. For DAC's hardware exception handling, add
hardware exception holder used to determine if a C++ exception should be thrown for a hardware exception. Cleaned up PAL initialization interactions between the debugger modules (PAL_InitializeDLL) and coreclr (PAL_InitializeCoreCLR).
Diffstat (limited to 'src/pal/src/exception/signal.cpp')
-rw-r--r--src/pal/src/exception/signal.cpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/pal/src/exception/signal.cpp b/src/pal/src/exception/signal.cpp
index 4a90a55832..8e5f52825c 100644
--- a/src/pal/src/exception/signal.cpp
+++ b/src/pal/src/exception/signal.cpp
@@ -132,6 +132,10 @@ void SEHInitializeSignals(DWORD flags)
handle_signal(SIGFPE, sigfpe_handler);
handle_signal(SIGBUS, sigbus_handler);
handle_signal(SIGSEGV, sigsegv_handler);
+#if USE_SIGNALS_FOR_THREAD_SUSPENSION
+ handle_signal(SIGUSR1, suspend_handler);
+ handle_signal(SIGUSR2, resume_handler);
+#endif
if (flags & PAL_INITIALIZE_ALL_SIGNALS)
{
@@ -160,10 +164,6 @@ void SEHInitializeSignals(DWORD flags)
#ifdef SIGINFO
handle_signal(SIGINFO, NULL);
#endif // SIGINFO
-#if USE_SIGNALS_FOR_THREAD_SUSPENSION
- handle_signal(SIGUSR1, suspend_handler);
- handle_signal(SIGUSR2, resume_handler);
-#endif
/* The default action for SIGPIPE is process termination.
Since SIGPIPE can be signaled when trying to write on a socket for which
@@ -548,25 +548,13 @@ static void common_signal_handler(PEXCEPTION_POINTERS pointers, int code,
/* Unmask signal so we can receive it again */
sigemptyset(&signal_set);
- sigaddset(&signal_set,code);
- if(-1 == sigprocmask(SIG_UNBLOCK,&signal_set,NULL))
+ sigaddset(&signal_set, code);
+ if(-1 == sigprocmask(SIG_UNBLOCK, &signal_set, NULL))
{
- ASSERT("sigprocmask failed; error is %d (%s)\n",errno, strerror(errno));
+ ASSERT("sigprocmask failed; error is %d (%s)\n", errno, strerror(errno));
}
- if (g_hardwareExceptionHandler != NULL)
- {
- PAL_SEHException exception(pointers->ExceptionRecord, pointers->ContextRecord);
-
- g_hardwareExceptionHandler(&exception);
- ASSERT("HardwareExceptionHandler has returned, it should not.");
- }
- else
- {
- ASSERT("Unhandled hardware exception\n");
- }
-
- ExitProcess(pointers->ExceptionRecord->ExceptionCode);
+ SEHProcessException(pointers);
}
/*++