diff options
author | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-10-26 23:09:02 +0000 |
---|---|---|
committer | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-10-26 23:09:02 +0000 |
commit | f944ba3fbb6136a14d47bf40f5cf1567ba3f8008 (patch) | |
tree | d93cf9d7a21a8d42655f711bda013801d9552e9e /src | |
parent | Support building with WIN32_LEAN_AND_MEAN (#60) (diff) | |
download | breakpad-f944ba3fbb6136a14d47bf40f5cf1567ba3f8008.tar.xz |
MinidumpProcessor uses the wrong context for non-crash threads (#62). r=bryner
http://groups.google.com/group/airbag-dev/browse_thread/thread/74743a397c52b7e2
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@52 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r-- | src/processor/minidump_processor.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc index d783654d..9d1279bf 100644 --- a/src/processor/minidump_processor.cc +++ b/src/processor/minidump_processor.cc @@ -79,6 +79,8 @@ ProcessState* MinidumpProcessor::Process(const string &minidump_file) { return NULL; } + MinidumpContext *context = thread->GetContext(); + if (process_state->crashed_ && thread->GetThreadID() == exception_thread_id) { if (found_crash_thread) { @@ -86,6 +88,13 @@ ProcessState* MinidumpProcessor::Process(const string &minidump_file) { return NULL; } + // Use the exception record's context for the crashed thread, instead + // of the thread's own context. For the crashed thread, the thread's + // own context is the state inside the exception handler. Using it + // would not result in the expected stack trace from the time of the + // crash. + context = exception->GetContext(); + process_state->crash_thread_ = thread_index; found_crash_thread = true; } @@ -96,7 +105,7 @@ ProcessState* MinidumpProcessor::Process(const string &minidump_file) { } scoped_ptr<Stackwalker> stackwalker( - Stackwalker::StackwalkerForCPU(exception->GetContext(), + Stackwalker::StackwalkerForCPU(context, thread_memory, dump.GetModuleList(), supplier_)); |