aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-05-19 17:27:40 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-05-19 17:27:40 +0000
commitb91bb881d5e78a59bcc570a3c68be7966a18092c (patch)
treedc0ce1992dd7a992fdc170303ec9cffd74e67713 /src/common/mac
parentMicrosoft broke PROCESS_ALL_ACCESS when we build with WINVER=0x600. See http:... (diff)
downloadbreakpad-b91bb881d5e78a59bcc570a3c68be7966a18092c.tar.xz
Fix to ignore source files that have a text address of 0 in their stabs entry
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@275 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/mac')
-rw-r--r--src/common/mac/dump_syms.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/mac/dump_syms.mm b/src/common/mac/dump_syms.mm
index d96e1ac0..133c6ab2 100644
--- a/src/common/mac/dump_syms.mm
+++ b/src/common/mac/dump_syms.mm
@@ -287,6 +287,14 @@ static const int kTextSection = 1;
NSString *ext = [src pathExtension];
NSNumber *address = [NSNumber numberWithUnsignedLongLong:list->n_value];
+ // Leopard puts .c files with no code as an offset of 0, but a
+ // crash can't happen here and it throws off our code that matches
+ // symbols to line numbers so we ignore them..
+ // Return YES because this isn't an error, just something we don't
+ // care to handle.
+ if ([address unsignedLongValue] == 0) {
+ return YES;
+ }
// TODO(waylonis):Ensure that we get the full path for the source file
// from the first N_SO record
// If there is an extension, we'll consider it source code
@@ -363,6 +371,8 @@ static const int kTextSection = 1;
nlist64.n_desc = SwapShortIfNeeded(list->n_desc);
nlist64.n_value = (uint64_t)SwapLongIfNeeded(list->n_value);
+ // TODO(nealsid): is this broken? we get NO if one symbol fails
+ // but then we lose that information if another suceeeds
if ([self processSymbolItem:&nlist64 stringTable:strtab])
result = YES;
}