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, 14 insertions, 2 deletions
diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc
index cee9a734..74b41acf 100644
--- a/src/processor/minidump_stackwalk.cc
+++ b/src/processor/minidump_stackwalk.cc
@@ -31,6 +31,10 @@
//
// Author: Mark Mentovai
+#ifdef HAVE_CONFIG_H
+#include <config.h> // Must come first
+#endif
+
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@@ -57,6 +61,7 @@ struct Options {
bool machine_readable;
bool output_stack_contents;
bool output_requesting_thread_only;
+ bool brief;
string minidump_file;
std::vector<string> symbol_paths;
@@ -110,6 +115,8 @@ bool PrintMinidumpProcess(const Options& options) {
if (options.machine_readable) {
PrintProcessStateMachineReadable(process_state);
+ } else if (options.brief) {
+ PrintRequestingThreadBrief(process_state);
} else {
PrintProcessState(process_state, options.output_stack_contents,
options.output_requesting_thread_only, &resolver);
@@ -130,7 +137,8 @@ static void Usage(int argc, const char *argv[], bool error) {
"\n"
" -m Output in machine-readable format\n"
" -s Output stack contents\n"
- " -c Output thread that causes crash or dump only\n",
+ " -c Output thread that causes crash or dump only\n"
+ " -b Brief of the thread that causes crash or dump\n",
google_breakpad::BaseName(argv[0]).c_str());
}
@@ -140,14 +148,18 @@ static void SetupOptions(int argc, const char *argv[], Options* options) {
options->machine_readable = false;
options->output_stack_contents = false;
options->output_requesting_thread_only = false;
+ options->brief = false;
- while ((ch = getopt(argc, (char * const*)argv, "chms")) != -1) {
+ while ((ch = getopt(argc, (char* const*)argv, "bchms")) != -1) {
switch (ch) {
case 'h':
Usage(argc, argv, false);
exit(0);
break;
+ case 'b':
+ options->brief = true;
+ break;
case 'c':
options->output_requesting_thread_only = true;
break;