diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/exception.h | 4 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 8 |
3 files changed, 17 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 66ab3f727..4565d1b2b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2014-03-19 Corinna Vinschen <corinna@vinschen.de> + * exception.h (exception::handle_while_being_debugged): Declare. + (exception::exception): Install unhandled exception filter. + * exceptions.cc (exception::handle_while_being_debugged): New method. + +2014-03-19 Corinna Vinschen <corinna@vinschen.de> + * passwd.cc (pg_ent::enumerate_ad): Ignore primary domain in list of trusted domains only if all trusted domains are enumerated anyway. Explain why. diff --git a/winsup/cygwin/exception.h b/winsup/cygwin/exception.h index 6792536c9..673f3b3b5 100644 --- a/winsup/cygwin/exception.h +++ b/winsup/cygwin/exception.h @@ -111,6 +111,7 @@ class exception #ifdef __x86_64__ static bool handler_installed; static int handle (LPEXCEPTION_POINTERS); + static int handle_while_being_debugged (LPEXCEPTION_POINTERS); #else exception_list el; exception_list *save; @@ -123,7 +124,8 @@ public: if (!handler_installed) { handler_installed = true; - AddVectoredExceptionHandler (1, handle); + SetUnhandledExceptionFilter (handle); + AddVectoredExceptionHandler (1, handle_while_being_debugged); } #else save = _except_list; diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index e9e8778c2..fac65bf01 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -556,6 +556,14 @@ rtl_unwind (exception_list *frame, PEXCEPTION_RECORD e) bool exception::handler_installed NO_COPY; int +exception::handle_while_being_debugged (LPEXCEPTION_POINTERS ep) +{ + if (being_debugged ()) + return handle (ep); + return EXCEPTION_CONTINUE_SEARCH; +} + +int exception::handle (LPEXCEPTION_POINTERS ep) #else #define CYG_EXC_CONTINUE_EXECUTION ExceptionContinueExecution |