From 7b8eb04745517a0f5e9addc89c0c5e10e1212743 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Mon, 1 Dec 2008 17:05:43 +0000 Subject: 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 --- src/common/mac/dump_syms.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/common/mac/dump_syms.mm') 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]; -- cgit v1.2.1