issue 281 - dump_syms fails to find dylib symbol file inside of a bundle. r=nealsid

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@298 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek 2008-12-01 17:05:43 +00:00
parent 5f27d9125c
commit 7b8eb04745

View file

@ -1129,16 +1129,18 @@ static BOOL WriteFormat(int fd, const char *fmt, ...) {
// e.g. suppose sourcepath_ is /tmp/foo/test.dSYM // e.g. suppose sourcepath_ is /tmp/foo/test.dSYM
NSString *dwarfBinName = [[sourcePath_ lastPathComponent] stringByDeletingPathExtension]; NSString *dwarfBinName = [[sourcePath_ lastPathComponent] stringByDeletingPathExtension];
NSString *dwarfBinPath;
// now, dwarfBinName is "test" // now, dwarfBinName is "test"
while (![[dwarfBinName stringByDeletingPathExtension] isEqualToString:dwarfBinName]) { while (![[dwarfBinName stringByDeletingPathExtension] isEqualToString:dwarfBinName]) {
dwarfBinPath = [dsymBundle pathForResource:dwarfBinName ofType:nil inDirectory:@"DWARF"];
if (dwarfBinPath != nil)
break;
dwarfBinName = [dwarfBinName stringByDeletingPathExtension]; dwarfBinName = [dwarfBinName stringByDeletingPathExtension];
} }
NSString *dwarfBinPath;
dwarfBinPath = [dsymBundle pathForResource:dwarfBinName ofType:nil inDirectory:@"DWARF"];
if (dwarfBinPath == nil) { if (dwarfBinPath == nil) {
NSLog(@"The bundle passed on the command line does not appear to be a DWARF dSYM bundle"); NSLog(@"The bundle passed on the command line does not appear to be a DWARF dSYM bundle");
[self autorelease]; [self autorelease];