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
This commit is contained in:
parent
29401d2457
commit
f944ba3fbb
@ -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_));
|
||||
|
Loading…
Reference in New Issue
Block a user