diff options
Diffstat (limited to 'src/tools/linux/md2core')
-rw-r--r-- | src/tools/linux/md2core/minidump-2-core.cc | 23 |
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); |