* 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:
parent
bbdd6c47c9
commit
3a4dab46c3
@ -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>
|
2013-07-19 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||||
|
|
||||||
* spawn.cc (child_info_spawn::worker): Reinstate using temp buffer for
|
* spawn.cc (child_info_spawn::worker): Reinstate using temp buffer for
|
||||||
|
@ -1215,6 +1215,7 @@ signal_exit (int sig, siginfo_t *si)
|
|||||||
case SIGTRAP:
|
case SIGTRAP:
|
||||||
case SIGXCPU:
|
case SIGXCPU:
|
||||||
case SIGXFSZ:
|
case SIGXFSZ:
|
||||||
|
if (si->si_code == SI_KERNEL)
|
||||||
sig |= 0x80; /* Flag that we've "dumped core" */
|
sig |= 0x80; /* Flag that we've "dumped core" */
|
||||||
if (try_to_debug ())
|
if (try_to_debug ())
|
||||||
break;
|
break;
|
||||||
@ -1224,10 +1225,11 @@ signal_exit (int sig, siginfo_t *si)
|
|||||||
{
|
{
|
||||||
CONTEXT c;
|
CONTEXT c;
|
||||||
c.ContextFlags = CONTEXT_FULL;
|
c.ContextFlags = CONTEXT_FULL;
|
||||||
RtlCaptureContext (&c);
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
RtlCaptureContext (&c);
|
||||||
cygwin_exception exc ((PUINT_PTR) _my_tls.thread_context.rbp, &c);
|
cygwin_exception exc ((PUINT_PTR) _my_tls.thread_context.rbp, &c);
|
||||||
#else
|
#else
|
||||||
|
GetThreadContext (GetCurrentThread (), &c);
|
||||||
cygwin_exception exc ((PUINT_PTR) _my_tls.thread_context.ebp, &c);
|
cygwin_exception exc ((PUINT_PTR) _my_tls.thread_context.ebp, &c);
|
||||||
#endif
|
#endif
|
||||||
exc.dumpstack ();
|
exc.dumpstack ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user