* 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.
This commit is contained in:
Christopher Faylor 2013-07-19 23:04:32 +00:00
parent bbdd6c47c9
commit 3a4dab46c3
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2013-07-19 Christopher Faylor <me.cygwin2013@cgf.cx>
* 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.
2013-07-19 Christopher Faylor <me.cygwin2013@cgf.cx>
* spawn.cc (child_info_spawn::worker): Reinstate using temp buffer for

View File

@ -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 ();