From c2d969cb1050803961a53cfdbbcff5c69e579ebb Mon Sep 17 00:00:00 2001 From: Joshua Peraza Date: Fri, 16 Dec 2016 12:10:33 -0800 Subject: Added classes to support reading unloaded module lists in minidumps. The implementations of Module/UnloadedModule and ModuleList/UnloadedModuleList are very similar. They have been made separate classes because they operate on different structs, complicating factoring code into a base class and have sufficiently different implementation that templates would not be suitable. When unloaded modules have partially overlapping ranges, the module shrink down feature is used to move the start of the higher range to the end of the lower range. If two unloaded modules overlap identically, the second module will not be added to the range map and the failure ignored. Places where MinidumpUnloadedModule differs from MinidumpModule: code_identifier: the android/linux case is deleted since cv_records never exist. debug_file/debug_identifier/version: always return empty strings. Read: an expected size is provided as opposed to MD_MODULE_SIZE. A seek is used if there are extra, unused bytes. Places where MinidumpUnloadedModuleList differs from MinidumpModuleList: Read: entry and header size is provided in the header in addition to count. This changes the checks and handling of padding. Failures from StoreRange are ignored. GetMainModule: always returns NULL. BUG= Change-Id: I52e93d3ccc38483f50a6418fede8b506ec879aaa Reviewed-on: https://chromium-review.googlesource.com/421566 Reviewed-by: Joshua Peraza --- src/google_breakpad/common/minidump_format.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/google_breakpad/common') diff --git a/src/google_breakpad/common/minidump_format.h b/src/google_breakpad/common/minidump_format.h index 251e503d..b99c8f7c 100644 --- a/src/google_breakpad/common/minidump_format.h +++ b/src/google_breakpad/common/minidump_format.h @@ -676,6 +676,20 @@ typedef enum { MD_OS_NACL = 0x8205 /* Native Client (NaCl) */ } MDOSPlatform; +typedef struct { + uint64_t base_of_image; + uint32_t size_of_image; + uint32_t checksum; + uint32_t time_date_stamp; + MDRVA module_name_rva; +} MDRawUnloadedModule; + +typedef struct { + uint32_t size_of_header; + uint32_t size_of_entry; + uint32_t number_of_entries; +} MDRawUnloadedModuleList; /* MINIDUMP_UNLOADED_MODULE_LIST */ + typedef struct { uint16_t year; uint16_t month; -- cgit v1.2.1