From d10c8c18ae5d92999f4154d27ed844c7803425a4 Mon Sep 17 00:00:00 2001 From: "mdempsky@chromium.org" Date: Thu, 11 Dec 2014 01:17:43 +0000 Subject: 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 --- src/tools/linux/md2core/minidump-2-core.cc | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/tools') 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 #include +#include #include #include #include @@ -47,6 +48,7 @@ #include #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::MDRawDebug MDRawDebug; +typedef MDTypeHelper::MDRawLinkMap MDRawLinkMap; + static const MDRVA kInvalidMDRVA = static_cast(-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(debug->brk), + static_cast(debug->ldbase), + static_cast(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(link_map->addr), + static_cast(link_map->ld), full_file.GetAsciiMDString(link_map->name).c_str()); } crashinfo->link_map.push_back(*link_map); -- cgit v1.2.1