diff options
author | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-10-18 20:54:20 +0000 |
---|---|---|
committer | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-10-18 20:54:20 +0000 |
commit | f4021f0c68b680e1b2a1fc027e81a54c700dd245 (patch) | |
tree | c76d9a3d388a67db676e8dea54269c675e63baeb /src/client/windows/handler/exception_handler.cc | |
parent | Remove assertion for a variable that doesn't exist. Patch by Alfred Peng (diff) | |
download | breakpad-f4021f0c68b680e1b2a1fc027e81a54c700dd245.tar.xz |
Make Breakpad's debug-exception-ignoring configurable. r=Nicolas Sylvain
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@224 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/handler/exception_handler.cc')
-rw-r--r-- | src/client/windows/handler/exception_handler.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc index 4bb67b21..0e6c43c9 100644 --- a/src/client/windows/handler/exception_handler.cc +++ b/src/client/windows/handler/exception_handler.cc @@ -72,7 +72,8 @@ ExceptionHandler::ExceptionHandler(const wstring &dump_path, requesting_thread_id_(0), exception_info_(NULL), assertion_(NULL), - handler_return_value_(false) { + handler_return_value_(false), + handle_debug_exceptions_(false) { #if _MSC_VER >= 1400 // MSVC 2005/8 previous_iph_ = NULL; #endif // _MSC_VER >= 1400 @@ -274,10 +275,13 @@ LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS *exinfo) { // Ignore EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP exceptions. This // logic will short-circuit before calling WriteMinidumpOnHandlerThread, // allowing something else to handle the breakpoint without incurring the - // overhead transitioning to and from the handler thread. + // overhead transitioning to and from the handler thread. This behavior + // can be overridden by calling ExceptionHandler::set_handle_debug_exceptions. DWORD code = exinfo->ExceptionRecord->ExceptionCode; LONG action; - if (code != EXCEPTION_BREAKPOINT && code != EXCEPTION_SINGLE_STEP && + bool is_debug_exception = (code == EXCEPTION_BREAKPOINT) || + (code == EXCEPTION_SINGLE_STEP); + if ((!is_debug_exception || current_handler->get_handle_debug_exceptions()) && current_handler->WriteMinidumpOnHandlerThread(exinfo, NULL)) { // The handler fully handled the exception. Returning // EXCEPTION_EXECUTE_HANDLER indicates this to the system, and usually |