[breakpad] Add MINIDUMP_THREAD_NAME_LIST support

Change-Id: I84205358ae48e757fa3b836747eadc32c2671756
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3690389
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
Ben Hamilton
2022-06-06 19:01:15 -06:00
committed by Joshua Peraza
parent 737e2cd338
commit 4d85225467
10 changed files with 399 additions and 3 deletions

View File

@@ -271,10 +271,15 @@ static void ProcessSingleReport(Options *options, NSString *file_path) {
int requesting_thread = process_state.requesting_thread();
if (requesting_thread != -1) {
printf("\n");
printf("Thread %d (%s)\n",
printf("Thread %d (%s)",
requesting_thread,
process_state.crashed() ? "crashed" :
"requested dump, did not crash");
string requesting_thread_name = process_state.thread_names()->at(requesting_thread);
if (!requesting_thread_name.empty()) {
printf(" (name: %s)", requesting_thread_name.c_str());
}
printf("\n");
PrintStack(process_state.threads()->at(requesting_thread), cpu);
}
@@ -287,7 +292,12 @@ static void ProcessSingleReport(Options *options, NSString *file_path) {
if (thread_index != requesting_thread) {
// Don't print the crash thread again, it was already printed.
printf("\n");
printf("Thread %d\n", thread_index);
printf("Thread %d", thread_index);
string thread_name = process_state.thread_names()->at(thread_index);
if (!thread_name.empty()) {
printf(" (name: %s)", thread_name.c_str());
}
printf("\n");
PrintStack(process_state.threads()->at(thread_index), cpu);
google_breakpad::MemoryRegion *thread_stack_bytes =
thread_memory_regions->at(thread_index);