diff --git a/src/client/mac/handler/dynamic_images.h b/src/client/mac/handler/dynamic_images.h index 545ae6cc..2242899c 100644 --- a/src/client/mac/handler/dynamic_images.h +++ b/src/client/mac/handler/dynamic_images.h @@ -153,7 +153,8 @@ class DynamicImage { path = "(unknown)"; } printf("%p: %s\n", GetLoadAddress(), path); - MachHeader(*GetMachHeader()).Print(); + mach_header *header = GetMachHeader(); + MachHeader(*header).Print(); printf("vmaddr\t\t: %p\n", reinterpret_cast(GetVMAddr())); printf("vmsize\t\t: %d\n", GetVMSize()); printf("slide\t\t: %d\n", GetVMAddrSlide()); @@ -278,7 +279,8 @@ class DynamicImages { for (int i = 0; i < (int)image_list_.size(); ++i) { printf("dyld: %p: name = %s\n", _dyld_get_image_header(i), _dyld_get_image_name(i) ); - MachHeader(*_dyld_get_image_header(i)).Print(); + const mach_header *header = _dyld_get_image_header(i); + MachHeader(*header).Print(); } } diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc index d7a92081..3ce8360a 100644 --- a/src/processor/minidump_stackwalk.cc +++ b/src/processor/minidump_stackwalk.cc @@ -255,7 +255,8 @@ static void PrintModules(const CodeModules *modules) { // PrintModulesMachineReadable outputs a list of loaded modules, // one per line, in the following machine-readable pipe-delimited // text format: -// Module|{Module Filename}|{Version}|{Base Address}|{Max Address}|{Main} +// Module|{Module Filename}|{Version}|{Debug Filename}|{Identifier}| +// {Base Address}|{Max Address}|{Main} static void PrintModulesMachineReadable(const CodeModules *modules) { if (!modules) return; @@ -272,10 +273,12 @@ static void PrintModulesMachineReadable(const CodeModules *modules) { ++module_sequence) { const CodeModule *module = modules->GetModuleAtSequence(module_sequence); u_int64_t base_address = module->base_address(); - printf("Module%c%s%c%s%c0x%08llx%c0x%08llx%c%d\n", + printf("Module%c%s%c%s%c%s%c%s%c0x%08llx%c0x%08llx%c%d\n", kOutputSeparator, StripSeparator(PathnameStripper::File(module->code_file())).c_str(), kOutputSeparator, StripSeparator(module->version()).c_str(), + kOutputSeparator, StripSeparator(module->debug_file()).c_str(), + kOutputSeparator, StripSeparator(module->code_identifier()).c_str(), kOutputSeparator, base_address, kOutputSeparator, base_address + module->size() - 1, kOutputSeparator, base_address == main_address ? 1 : 0);