aboutsummaryrefslogtreecommitdiff
path: root/src/processor/minidump_stackwalk.cc
diff options
context:
space:
mode:
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);