aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-12-01 18:42:16 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-12-01 18:42:16 +0000
commitaf553e22cbd9ab8b93af1a4490c2cf665a9e7ad0 (patch)
tree47eaca3fab0ada83820748adf93cacc94edec09d /src/common/mac
parentissue 281 - dump_syms fails to find dylib symbol file inside of a bundle. r=n... (diff)
downloadbreakpad-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/common/mac')
-rw-r--r--src/common/mac/dump_syms.mm13
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");