aboutsummaryrefslogtreecommitdiff
path: root/src/processor/minidump_dump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/minidump_dump.cc')
-rw-r--r--src/processor/minidump_dump.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/processor/minidump_dump.cc b/src/processor/minidump_dump.cc
index 4716aa08..83afd1da 100644
--- a/src/processor/minidump_dump.cc
+++ b/src/processor/minidump_dump.cc
@@ -1,5 +1,4 @@
-// Copyright (c) 2006, Google Inc.
-// All rights reserved.
+// Copyright 2006 Google LLC
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -11,7 +10,7 @@
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
-// * Neither the name of Google Inc. nor the names of its
+// * Neither the name of Google LLC nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
@@ -36,6 +35,7 @@
#include <string.h>
#include <unistd.h>
+#include "common/path_helper.h"
#include "common/scoped_ptr.h"
#include "google_breakpad/processor/minidump.h"
#include "processor/logging.h"
@@ -44,6 +44,7 @@ namespace {
using google_breakpad::Minidump;
using google_breakpad::MinidumpThreadList;
+using google_breakpad::MinidumpThreadNameList;
using google_breakpad::MinidumpModuleList;
using google_breakpad::MinidumpMemoryInfoList;
using google_breakpad::MinidumpMemoryList;
@@ -91,7 +92,7 @@ static void DumpRawStream(Minidump *minidump,
// in compatibility warnings.
uint32_t int_remaining = remaining;
printf("%.*s", int_remaining, &contents[current_offset]);
- char *next_null = reinterpret_cast<char *>(
+ char *next_null = reinterpret_cast<char*>(
memchr(&contents[current_offset], 0, remaining));
if (next_null == NULL)
break;
@@ -121,6 +122,11 @@ static bool PrintMinidumpDump(const Options& options) {
thread_list->Print();
}
+ MinidumpThreadNameList *thread_name_list = minidump.GetThreadNameList();
+ if (thread_name_list) {
+ thread_name_list->Print();
+ }
+
// It's useful to be able to see the full list of modules here even if it
// would cause minidump_stackwalk to fail.
MinidumpModuleList::set_max_modules(UINT32_MAX);
@@ -233,7 +239,7 @@ Usage(int argc, char *argv[], bool error) {
" <minidump> should be a minidump.\n"
" -x:\t Display memory in a hexdump like format\n"
" -h:\t Usage\n",
- argv[0]);
+ google_breakpad::BaseName(argv[0]).c_str());
}
//=============================================================================
@@ -241,7 +247,7 @@ static void
SetupOptions(int argc, char *argv[], Options *options) {
int ch;
- while ((ch = getopt(argc, (char * const *)argv, "xh")) != -1) {
+ while ((ch = getopt(argc, (char * const*)argv, "xh")) != -1) {
switch (ch) {
case 'x':
options->hexdump = true;