mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-06 22:48:30 +01:00
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
This commit is contained in:
parent
bbbe29de11
commit
d10c8c18ae
4 changed files with 108 additions and 23 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue