summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-02-28 17:57:42 +0000
committerCorinna Vinschen <corinna@vinschen.de>2008-02-28 17:57:42 +0000
commit83082b6a68f64eb8c4bc4a0d972514813d26b320 (patch)
treec7120a21257f5b442021cfb3b07c9265ba20369a
parent5003a3d1c5a197e34ea684d3e3f6d4a2daf1ff49 (diff)
downloadcygnal-83082b6a68f64eb8c4bc4a0d972514813d26b320.tar.gz
cygnal-83082b6a68f64eb8c4bc4a0d972514813d26b320.tar.bz2
cygnal-83082b6a68f64eb8c4bc4a0d972514813d26b320.zip
* exceptions.cc (_cygtls::handle_exceptions): When being debugged,
leave through SetThreadContext, too, to keep exception handler stack intact.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/exceptions.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f2bf25cd4..b91c83c43 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2008-02-28 Corinna Vinschen <corinna@vinschen.de>
+ * exceptions.cc (_cygtls::handle_exceptions): When being debugged,
+ leave through SetThreadContext, too, to keep exception handler stack
+ intact.
+
+2008-02-28 Corinna Vinschen <corinna@vinschen.de>
+
* exceptions.cc (open_stackdumpfile): Add comments.
2008-02-28 Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 999094d30..3b4184db0 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -647,7 +647,7 @@ _cygtls::handle_exceptions (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT
if (try_to_debug (0))
{
debugging = true;
- return 0;
+ goto out;
}
open_stackdumpfile ();
@@ -692,7 +692,7 @@ _cygtls::handle_exceptions (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT
to the caller without visiting any of the helpful code installed prior
to this function. This should work ok, since a longjmp() out of here has
to work if linux signal semantics are to be maintained. */
-
+out:
SetThreadContext (GetCurrentThread (), in);
return 0; /* Never actually returns. This is just to keep gcc happy. */
}