aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authormdempsky@chromium.org <mdempsky@chromium.org>2014-12-11 01:17:43 +0000
committermdempsky@chromium.org <mdempsky@chromium.org>2014-12-11 01:17:43 +0000
commitd10c8c18ae5d92999f4154d27ed844c7803425a4 (patch)
tree9149cf99cddeac960d39757a742de5feec7909b3 /src/tools
parentBreakpad: Fix build with new clang versions. (diff)
downloadbreakpad-d10c8c18ae5d92999f4154d27ed844c7803425a4.tar.xz
Remove pointers from serialized file format
BUG=breakpad:621 R=thestig@chromium.org Review URL: https://breakpad.appspot.com/1764002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1410 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/linux/md2core/minidump-2-core.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc
index 815e6e75..82007604 100644
--- a/src/tools/linux/md2core/minidump-2-core.cc
+++ b/src/tools/linux/md2core/minidump-2-core.cc
@@ -35,6 +35,7 @@
#include <elf.h>
#include <errno.h>
+#include <inttypes.h>
#include <link.h>
#include <stdio.h>
#include <stdlib.h>
@@ -47,6 +48,7 @@
#include <vector>
#include "common/linux/memory_mapped_file.h"
+#include "common/minidump_type_helper.h"
#include "common/scoped_ptr.h"
#include "google_breakpad/common/minidump_format.h"
#include "third_party/lss/linux_syscall_support.h"
@@ -81,9 +83,13 @@
typedef user_regs user_regs_struct;
#endif
+using google_breakpad::MDTypeHelper;
using google_breakpad::MemoryMappedFile;
using google_breakpad::MinidumpMemoryRange;
+typedef MDTypeHelper<sizeof(ElfW(Addr))>::MDRawDebug MDRawDebug;
+typedef MDTypeHelper<sizeof(ElfW(Addr))>::MDRawLinkMap MDRawLinkMap;
+
static const MDRVA kInvalidMDRVA = static_cast<MDRVA>(-1);
static bool verbose;
static std::string g_custom_so_basedir;
@@ -691,14 +697,14 @@ ParseDSODebugInfo(CrashedProcess* crashinfo, const MinidumpMemoryRange& range,
"MD_LINUX_DSO_DEBUG:\n"
"Version: %d\n"
"Number of DSOs: %d\n"
- "Brk handler: %p\n"
- "Dynamic loader at: %p\n"
- "_DYNAMIC: %p\n",
+ "Brk handler: 0x%" PRIx64 "\n"
+ "Dynamic loader at: 0x%" PRIx64 "\n"
+ "_DYNAMIC: 0x%" PRIx64 "\n",
debug->version,
debug->dso_count,
- debug->brk,
- debug->ldbase,
- debug->dynamic);
+ static_cast<uint64_t>(debug->brk),
+ static_cast<uint64_t>(debug->ldbase),
+ static_cast<uint64_t>(debug->dynamic));
}
crashinfo->debug = *debug;
if (range.length() > sizeof(MDRawDebug)) {
@@ -713,8 +719,9 @@ ParseDSODebugInfo(CrashedProcess* crashinfo, const MinidumpMemoryRange& range,
if (link_map) {
if (verbose) {
fprintf(stderr,
- "#%03d: %p, %p, \"%s\"\n",
- i, link_map->addr, link_map->ld,
+ "#%03d: %" PRIx64 ", %" PRIx64 ", \"%s\"\n",
+ i, static_cast<uint64_t>(link_map->addr),
+ static_cast<uint64_t>(link_map->ld),
full_file.GetAsciiMDString(link_map->name).c_str());
}
crashinfo->link_map.push_back(*link_map);