From d31805a14c8e555842c3a654f9eb0e12694635b1 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 20 Jul 2013 17:11:44 +0000 Subject: [PATCH] * exceptions.cc (signal_exit): Remove comment. Use __builtin_frame_address. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/exceptions.cc | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c7bfe8d37..6a7d285c3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2013-07-20 Christopher Faylor + + * exceptions.cc (signal_exit): Remove comment. Use + __builtin_frame_address. + 2013-07-20 Christopher Faylor * exceptions.cc (signal_exit): Nope. Nevermind. Dump core diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index a9fb87992..40ff8f0ce 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1218,8 +1218,6 @@ signal_exit (int sig, siginfo_t *si) sig |= 0x80; /* Flag that we've "dumped core" */ if (try_to_debug ()) break; - /* FIXME: We're still dumping core even if !(sig & 0x80). Need to - investigate if this should be shortcircuited in that case. */ if (si->si_code != SI_USER && si->si_cyg) ((cygwin_exception *) si->si_cyg)->dumpstack (); else @@ -1228,10 +1226,10 @@ signal_exit (int sig, siginfo_t *si) c.ContextFlags = CONTEXT_FULL; #ifdef __x86_64__ RtlCaptureContext (&c); - cygwin_exception exc ((PUINT_PTR) _my_tls.thread_context.rbp, &c); + cygwin_exception exc ((PUINT_PTR) __builtin_frame_address (0), &c); #else GetThreadContext (GetCurrentThread (), &c); - cygwin_exception exc ((PUINT_PTR) _my_tls.thread_context.ebp, &c); + cygwin_exception exc ((PUINT_PTR) __builtin_frame_address (0), &c); #endif exc.dumpstack (); }