diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-02-28 17:58:11 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-02-28 17:58:11 +0000 |
commit | 18368f26cd14c1a4b43c28d19e0c50cae57082e9 (patch) | |
tree | 53e5232777fb6d8f2ea45dbfa7823f51c1b764f5 | |
parent | 3f06d9545e327dd8a19c5e20a679412d0118445e (diff) | |
download | newlib-18368f26cd14c1a4b43c28d19e0c50cae57082e9.zip newlib-18368f26cd14c1a4b43c28d19e0c50cae57082e9.tar.gz newlib-18368f26cd14c1a4b43c28d19e0c50cae57082e9.tar.bz2 |
* exceptions.cc (_cygtls::handle_exceptions): When being debugged,
leave through SetThreadContext, too, to keep exception handler stack
intact.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ca3a0cf..8cc1649 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +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-27 Corinna Vinschen <corinna@vinschen.de> * cygtls.cc (_cygtls::init_exception_handler): Fix comment. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 2c9e0cb..9dfe6f3 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -631,7 +631,7 @@ _cygtls::handle_exceptions (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT if (try_to_debug (0)) { debugging = true; - return 0; + goto out; } open_stackdumpfile (); @@ -676,7 +676,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. */ } |