aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-07-17 20:32:08 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-07-17 20:32:08 +0000
commit23c364a2b4ded86287caf325aa533a3c24020348 (patch)
treec84c76098366ebf0675ae2540a0f9f3d476cdff3 /src/common/mac
parentIntegration test for Windows exception handler/minidump generation. (diff)
downloadbreakpad-23c364a2b4ded86287caf325aa533a3c24020348.tar.xz
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
Diffstat (limited to 'src/common/mac')
-rw-r--r--src/common/mac/dump_syms.mm15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/common/mac/dump_syms.mm b/src/common/mac/dump_syms.mm
index 88f1f4f1..73e4f76a 100644
--- a/src/common/mac/dump_syms.mm
+++ b/src/common/mac/dump_syms.mm
@@ -321,13 +321,16 @@ void DumpFunctionMap(const dwarf2reader::FunctionMap function_map) {
//=============================================================================
- (BOOL)loadSymbolInfo:(void *)base offset:(uint32_t)offset {
+ BOOL loadedStabs = [self loadSTABSSymbolInfo:base offset:offset];
+
NSMutableDictionary *archSections = [sectionData_ objectForKey:architecture_];
+ BOOL loadedDWARF = NO;
if ([archSections objectForKey:@"__DWARF__debug_info"]) {
// 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];
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::ENDIANNESS_BIG :
dwarf2reader::ENDIANNESS_LITTLE);
-
+#endif
uint64_t dbgOffset = 0;
dwarf2reader::SectionMap* oneArchitectureSectionMap = [self getSectionMapForArchitecture:architecture_];