aboutsummaryrefslogtreecommitdiff
path: root/src/processor/minidump_stackwalk.cc
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-11-06 23:00:19 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-11-06 23:00:19 +0000
commit76f052f8fbf8864dee5992b857229d06560a766a (patch)
tree330fbb8f2e053ab28e1a22ae825e2b94bd2026d9 /src/processor/minidump_stackwalk.cc
parentMinidumps should indicate which thread generated the dump and which requested (diff)
downloadbreakpad-76f052f8fbf8864dee5992b857229d06560a766a.tar.xz
Suppress handler thread from appearing in MinidumpProcessor's ProcessState
(#65). r=bryner - Interface change: (ProcessState).crash_thread is now requesting_thread and will be populated for non-crash dumps. If the requesting thread cannot be determined, requesting_thread is set to -1. http://groups.google.com/group/airbag-dev/browse_thread/thread/c422ec481a2db440 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@62 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/minidump_stackwalk.cc')
-rw-r--r--src/processor/minidump_stackwalk.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc
index 6832a4ac..d6a228fe 100644
--- a/src/processor/minidump_stackwalk.cc
+++ b/src/processor/minidump_stackwalk.cc
@@ -193,19 +193,21 @@ static bool PrintMinidumpProcess(const string &minidump_file,
printf("No crash\n");
}
- // If there's a crash thread, print it first.
- int crash_thread = -1;
- if (process_state->crashed()) {
- crash_thread = process_state->crash_thread();
+ // If the thread that requested the dump is known, print it first.
+ int requesting_thread = process_state->requesting_thread();
+ if (requesting_thread != -1) {
printf("\n");
- printf("Thread %d (crashed)\n", crash_thread);
- PrintStack(process_state->threads()->at(crash_thread), cpu);
+ printf("Thread %d (%s)\n",
+ requesting_thread,
+ process_state->crashed() ? "crashed" :
+ "requested dump, did not crash");
+ PrintStack(process_state->threads()->at(requesting_thread), cpu);
}
// Print all of the threads in the dump.
int thread_count = process_state->threads()->size();
for (int thread_index = 0; thread_index < thread_count; ++thread_index) {
- if (thread_index != crash_thread) {
+ if (thread_index != requesting_thread) {
// Don't print the crash thread again, it was already printed.
printf("\n");
printf("Thread %d\n", thread_index);