mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-12 12:22:56 +00:00
Add option to dump crash thread only
Add minidump_stackwalk option to dump the crash thread only Bug: 1129202 Change-Id: I1370b4dc972f76ba1d57fca083da7d486774e65a Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2762072 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
committed by
Joshua Peraza
parent
dff7d5afd5
commit
3bea2815bf
@@ -786,6 +786,7 @@ static void PrintModulesMachineReadable(const CodeModules* modules) {
|
||||
|
||||
void PrintProcessState(const ProcessState& process_state,
|
||||
bool output_stack_contents,
|
||||
bool output_requesting_thread_only,
|
||||
SourceLineResolverInterface* resolver) {
|
||||
// Print OS and CPU information.
|
||||
string cpu = process_state.system_info()->cpu;
|
||||
@@ -856,17 +857,19 @@ void PrintProcessState(const ProcessState& process_state,
|
||||
process_state.modules(), resolver);
|
||||
}
|
||||
|
||||
// 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 != requesting_thread) {
|
||||
// Don't print the crash thread again, it was already printed.
|
||||
printf("\n");
|
||||
printf("Thread %d\n", thread_index);
|
||||
PrintStack(process_state.threads()->at(thread_index), cpu,
|
||||
output_stack_contents,
|
||||
process_state.thread_memory_regions()->at(thread_index),
|
||||
process_state.modules(), resolver);
|
||||
if (!output_requesting_thread_only) {
|
||||
// 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 != requesting_thread) {
|
||||
// Don't print the crash thread again, it was already printed.
|
||||
printf("\n");
|
||||
printf("Thread %d\n", thread_index);
|
||||
PrintStack(process_state.threads()->at(thread_index), cpu,
|
||||
output_stack_contents,
|
||||
process_state.thread_memory_regions()->at(thread_index),
|
||||
process_state.modules(), resolver);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user