mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-07-21 06:28:52 +00:00
Fix for http://breakpad.appspot.com/18009 - run dump_syms on both PPC & i386 machines correctly, and process STABS/DWARF information in the same binary
R=stuart morgan A=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@359 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
f4f249e544
commit
23c364a2b4
|
@ -321,13 +321,16 @@ void DumpFunctionMap(const dwarf2reader::FunctionMap function_map) {
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
- (BOOL)loadSymbolInfo:(void *)base offset:(uint32_t)offset {
|
- (BOOL)loadSymbolInfo:(void *)base offset:(uint32_t)offset {
|
||||||
|
BOOL loadedStabs = [self loadSTABSSymbolInfo:base offset:offset];
|
||||||
|
|
||||||
NSMutableDictionary *archSections = [sectionData_ objectForKey:architecture_];
|
NSMutableDictionary *archSections = [sectionData_ objectForKey:architecture_];
|
||||||
|
BOOL loadedDWARF = NO;
|
||||||
if ([archSections objectForKey:@"__DWARF__debug_info"]) {
|
if ([archSections objectForKey:@"__DWARF__debug_info"]) {
|
||||||
// Treat this this as debug information
|
// Treat this this as debug information
|
||||||
return [self loadDWARFSymbolInfo:base offset:offset];
|
loadedDWARF = [self loadDWARFSymbolInfo:base offset:offset];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [self loadSTABSSymbolInfo:base offset:offset];
|
return loadedDWARF || loadedStabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -342,11 +345,15 @@ void DumpFunctionMap(const dwarf2reader::FunctionMap function_map) {
|
||||||
section *dbgInfoSection = [[archSections objectForKey:@"__DWARF__debug_info"] sectionPointer];
|
section *dbgInfoSection = [[archSections objectForKey:@"__DWARF__debug_info"] sectionPointer];
|
||||||
uint32_t debugInfoSize = SwapLongIfNeeded(dbgInfoSection->size);
|
uint32_t debugInfoSize = SwapLongIfNeeded(dbgInfoSection->size);
|
||||||
|
|
||||||
// i think this will break if run on a big-endian machine
|
#if __BIG_ENDIAN__
|
||||||
|
dwarf2reader::ByteReader byte_reader(swap ?
|
||||||
|
dwarf2reader::ENDIANNESS_LITTLE :
|
||||||
|
dwarf2reader::ENDIANNESS_BIG);
|
||||||
|
#elif __LITTLE_ENDIAN__
|
||||||
dwarf2reader::ByteReader byte_reader(swap ?
|
dwarf2reader::ByteReader byte_reader(swap ?
|
||||||
dwarf2reader::ENDIANNESS_BIG :
|
dwarf2reader::ENDIANNESS_BIG :
|
||||||
dwarf2reader::ENDIANNESS_LITTLE);
|
dwarf2reader::ENDIANNESS_LITTLE);
|
||||||
|
#endif
|
||||||
uint64_t dbgOffset = 0;
|
uint64_t dbgOffset = 0;
|
||||||
|
|
||||||
dwarf2reader::SectionMap* oneArchitectureSectionMap = [self getSectionMapForArchitecture:architecture_];
|
dwarf2reader::SectionMap* oneArchitectureSectionMap = [self getSectionMapForArchitecture:architecture_];
|
||||||
|
|
Loading…
Reference in a new issue