diff options
author | Christopher Faylor <me@cgf.cx> | 2013-07-19 23:04:32 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-07-19 23:04:32 +0000 |
commit | 3a4dab46c36a9a916cc87ce2ba6fc86202578ef9 (patch) | |
tree | bc5ec05a20e27f004c4dc8543761ddd5beb677ce /winsup/cygwin/exceptions.cc | |
parent | bbdd6c47c994fb1d688de594366f28e3b46c7053 (diff) | |
download | cygnal-3a4dab46c36a9a916cc87ce2ba6fc86202578ef9.tar.gz cygnal-3a4dab46c36a9a916cc87ce2ba6fc86202578ef9.tar.bz2 cygnal-3a4dab46c36a9a916cc87ce2ba6fc86202578ef9.zip |
* exceptions.cc (signal_exit): Only dump core when it's a "kernel" signal.
Only use RtlCaptureContext on x86_64. It doesn't seem to do what's expected on
x86.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 46af2ba78..3f1cdbfdb 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1215,7 +1215,8 @@ signal_exit (int sig, siginfo_t *si) case SIGTRAP: case SIGXCPU: case SIGXFSZ: - sig |= 0x80; /* Flag that we've "dumped core" */ + if (si->si_code == SI_KERNEL) + sig |= 0x80; /* Flag that we've "dumped core" */ if (try_to_debug ()) break; if (si->si_code != SI_USER && si->si_cyg) @@ -1224,10 +1225,11 @@ signal_exit (int sig, siginfo_t *si) { CONTEXT c; c.ContextFlags = CONTEXT_FULL; - RtlCaptureContext (&c); #ifdef __x86_64__ + RtlCaptureContext (&c); cygwin_exception exc ((PUINT_PTR) _my_tls.thread_context.rbp, &c); #else + GetThreadContext (GetCurrentThread (), &c); cygwin_exception exc ((PUINT_PTR) _my_tls.thread_context.ebp, &c); #endif exc.dumpstack (); |