aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/mac/dump_syms.mm8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/mac/dump_syms.mm b/src/common/mac/dump_syms.mm
index 5d96a741..91cdaa7e 100644
--- a/src/common/mac/dump_syms.mm
+++ b/src/common/mac/dump_syms.mm
@@ -1129,16 +1129,18 @@ static BOOL WriteFormat(int fd, const char *fmt, ...) {
// e.g. suppose sourcepath_ is /tmp/foo/test.dSYM
NSString *dwarfBinName = [[sourcePath_ lastPathComponent] stringByDeletingPathExtension];
+ NSString *dwarfBinPath;
// now, dwarfBinName is "test"
while (![[dwarfBinName stringByDeletingPathExtension] isEqualToString:dwarfBinName]) {
+ dwarfBinPath = [dsymBundle pathForResource:dwarfBinName ofType:nil inDirectory:@"DWARF"];
+ if (dwarfBinPath != nil)
+ break;
+
dwarfBinName = [dwarfBinName stringByDeletingPathExtension];
}
- NSString *dwarfBinPath;
- dwarfBinPath = [dsymBundle pathForResource:dwarfBinName ofType:nil inDirectory:@"DWARF"];
-
if (dwarfBinPath == nil) {
NSLog(@"The bundle passed on the command line does not appear to be a DWARF dSYM bundle");
[self autorelease];