Comments
-
Greg Hurrell
Status changed:
- From: New
- To: Open
-
Greg Hurrell
Thanks for the report. I'll see if I can do something about that unhelpful error message.
-
Greg Hurrell
I've got a patch from Nicholas Riley here locally that I haven't made public yet which might be of use.
I couldn't get Leopard's atos to work with dSYM files despite Apple's Web site claiming otherwise, so here's a patch to atosym that helps with decoding crash logs. It pulls the dSYM file out of a dSYM bundle as Apple uses in their kernel debug kits and subtracts rather than adds the offset (as atos does; I'm guessing that feature wasn't tested :-)
And the patch itself:
Index: atosym.m =================================================================== --- atosym.m (revision 8) +++ atosym.m (working copy) @@ -79,7 +79,7 @@ NSString *get_symbol_information (unsigned address) { - const char *command = [[NSString stringWithFormat:@"info line *%#x", address + offset] UTF8String]; + const char *command = [[NSString stringWithFormat:@"info line *%#x", address - offset] UTF8String]; char *template[MAXPATHLEN]; strcpy((char *)template, "/tmp/atosym.XXXXXX"); int temp = mkstemp((char *)template); @@ -170,11 +170,21 @@ show_usage(); goto Cleanup; } - if (![manager fileExistsAtPath:file]) + BOOL isDirectory; + if (![manager fileExistsAtPath:file isDirectory:&isDirectory]) { fprintf(stderr, "error: file \"%s\" does not exist\n", [file fileSystemRepresentation]); goto Cleanup; } + if (isDirectory) { + NSArray *dSYMs = [[NSBundle bundleWithPath:file] pathsForResourcesOfType:nil inDirectory:@"DWARF"]; + if ([dSYMs count] != 1) + { + fprintf(stderr, "error: found %d dSYM files (expected 1) in \"%s\"\n", [dSYMs count], [file fileSystemRepresentation]); + goto Cleanup; + } + file = [dSYMs objectAtIndex: 0]; + } dsym = [file retain]; // leak until exit NSString *architecture = [[defaults stringForKey:@"architecture"] lowercaseString];
Before I apply this I'm going to migrate the old Subversion repository over to Git.
-
Greg Hurrell
Ok, I've split Nicholas's patch into two commits and pushed it out.
-
Greg Hurrell
Status changed:
- From: Open
- To: Closed
-
Greg Hurrell
Product changed:
- From: atosym
- To: buildtools
-
Greg Hurrell
Whoops, accidentally changed the product without meaning to.
-
Greg Hurrell
Product changed:
- From: buildtools
- To: atosym
Add a comment
Comments are now closed for this issue.