aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/handler/exception_handler.cc
diff options
context:
space:
mode:
authorhansl@google.com <hansl@google.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-05-12 17:51:21 +0000
committerhansl@google.com <hansl@google.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-05-12 17:51:21 +0000
commit8cf0a52becf937650056dad55769a2d85d30f75d (patch)
treef34e673b59f35403ede177faf851e327fce5135e /src/client/windows/handler/exception_handler.cc
parentAdding prebuilt dump_syms.exe. (diff)
downloadbreakpad-8cf0a52becf937650056dad55769a2d85d30f75d.tar.xz
Moved exception_handler_test to the more aptly named exception_handler_death_test. It doesn't test anything else than death and exit.
Created the exception_handler_test that test the generation of dump and the dumps themselves. Moved all dump analysis code from minidump to its right class DumpAnalysis. The class is used by both minidump_test and exception_handler_test. The tests are way simpler that way (ie. no handling of HANDLE). minidump_test now uses the minidump_generator class instead of using Win32. It works well and pass all tests. exception_handler now passes both the exception and assertion infos to the client to generate the dump. If one is NULL it's going to be handled correctly. crash_generation_client can now RequestDump with both exception and assertion info. minidump_generator returns both the mini and full dump string pointers, and output both (or either) depending on which was generated. All original interfaces and method signature are still there, but call the new functions if possible. Review URL: http://codereview.chromium.org/1994015 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@596 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/handler/exception_handler.cc')
-rw-r--r--src/client/windows/handler/exception_handler.cc29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc
index 7bccc428..a877b2f1 100644
--- a/src/client/windows/handler/exception_handler.cc
+++ b/src/client/windows/handler/exception_handler.cc
@@ -490,12 +490,12 @@ void ExceptionHandler::HandleInvalidParameter(const wchar_t* expression,
EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context };
RtlCaptureContext(&exception_context);
exception_record.ExceptionCode = STATUS_NONCONTINUABLE_EXCEPTION;
-
+
// We store pointers to the the expression and function strings,
- // and the line as exception parameters to make them easy to
+ // and the line as exception parameters to make them easy to
// access by the developer on the far side.
exception_record.NumberParameters = 3;
- exception_record.ExceptionInformation[0] =
+ exception_record.ExceptionInformation[0] =
reinterpret_cast<ULONG_PTR>(&assertion.expression);
exception_record.ExceptionInformation[1] =
reinterpret_cast<ULONG_PTR>(&assertion.file);
@@ -510,7 +510,7 @@ void ExceptionHandler::HandleInvalidParameter(const wchar_t* expression,
&exception_ptrs,
&assertion);
} else {
- success = current_handler->WriteMinidumpOnHandlerThread(&exception_ptrs,
+ success = current_handler->WriteMinidumpOnHandlerThread(&exception_ptrs,
&assertion);
}
@@ -668,13 +668,7 @@ bool ExceptionHandler::WriteMinidumpWithException(
bool success = false;
if (IsOutOfProcess()) {
- // Use the EXCEPTION_POINTERS overload for RequestDump if
- // both exinfo and assertion are NULL.
- if (!assertion) {
- success = crash_generation_client_->RequestDump(exinfo);
- } else {
- success = crash_generation_client_->RequestDump(assertion);
- }
+ success = crash_generation_client_->RequestDump(exinfo, assertion);
} else {
if (minidump_write_dump_) {
HANDLE dump_file = CreateFile(next_minidump_path_c_,
@@ -690,12 +684,13 @@ bool ExceptionHandler::WriteMinidumpWithException(
except_info.ExceptionPointers = exinfo;
except_info.ClientPointers = FALSE;
- // Add an MDRawBreakpadInfo stream to the minidump, to provide additional
- // information about the exception handler to the Breakpad processor. The
- // information will help the processor determine which threads are
- // relevant. The Breakpad processor does not require this information but
- // can function better with Breakpad-generated dumps when it is present.
- // The native debugger is not harmed by the presence of this information.
+ // Add an MDRawBreakpadInfo stream to the minidump, to provide
+ // additional information about the exception handler to the Breakpad
+ // processor. The information will help the processor determine which
+ // threads are relevant. The Breakpad processor does not require this
+ // information but can function better with Breakpad-generated dumps
+ // when it is present. The native debugger is not harmed by the
+ // presence of this information.
MDRawBreakpadInfo breakpad_info;
breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID |
MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID;