diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2008-12-01 18:42:16 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2008-12-01 18:42:16 +0000 |
commit | af553e22cbd9ab8b93af1a4490c2cf665a9e7ad0 (patch) | |
tree | 47eaca3fab0ada83820748adf93cacc94edec09d /src | |
parent | issue 281 - dump_syms fails to find dylib symbol file inside of a bundle. r=n... (diff) | |
download | breakpad-af553e22cbd9ab8b93af1a4490c2cf665a9e7ad0.tar.xz |
follow up for issue 281 - dump_syms fails to find dylib symbol file inside of a bundle. handle files without an extension properly
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@299 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r-- | src/common/mac/dump_syms.mm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/common/mac/dump_syms.mm b/src/common/mac/dump_syms.mm index 91cdaa7e..b4f779df 100644 --- a/src/common/mac/dump_syms.mm +++ b/src/common/mac/dump_syms.mm @@ -1128,18 +1128,17 @@ static BOOL WriteFormat(int fd, const char *fmt, ...) { // e.g. suppose sourcepath_ is /tmp/foo/test.dSYM - NSString *dwarfBinName = [[sourcePath_ lastPathComponent] stringByDeletingPathExtension]; + NSString *dwarfBinName = [sourcePath_ lastPathComponent]; NSString *dwarfBinPath; - // now, dwarfBinName is "test" - - while (![[dwarfBinName stringByDeletingPathExtension] isEqualToString:dwarfBinName]) { + // We use a do/while loop so we can handle files without an extension + do { + dwarfBinName = [dwarfBinName stringByDeletingPathExtension]; + // now, dwarfBinName is "test" dwarfBinPath = [dsymBundle pathForResource:dwarfBinName ofType:nil inDirectory:@"DWARF"]; if (dwarfBinPath != nil) break; - - dwarfBinName = [dwarfBinName stringByDeletingPathExtension]; - } + } while (![[dwarfBinName stringByDeletingPathExtension] isEqualToString:dwarfBinName]); if (dwarfBinPath == nil) { NSLog(@"The bundle passed on the command line does not appear to be a DWARF dSYM bundle"); |