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
This commit is contained in:
parent
7b8eb04745
commit
af553e22cb
1 changed files with 6 additions and 7 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue