Search code examples
ioscrashsymbolicate

symbolicatecrash not working with dSYM, but 'atos' works


Excuse me! There's a problem confuse me!

I have the Myapp.app.dSYM. (All Symbols has stripped from the MyApp.app and copy to dSYM)

Now I use symbolicatecrash tool to symbolicate Crashes, it's not working! Hex address is still there.

Part of my crash log:

......
11  MyApp                              0x00000001010ac2c8 0x100070000 + 17023688
12  MyApp                              0x00000001010b1168 0x100070000 + 17043816
13  MyApp                              0x00000001010b10e0 0x100070000 + 17043680
......

So I try to use:

atos -arch arm64 -o MyApp.app.dSYM/Contents/Resources/DWARF/MyApp -l 0x100070000 0x00000001010b1168

and it's work! Symbolicated!

Related symbolicate log may help:

.................fetching symbol file for MyApp--[undef]

Searching []...-- NO MATCH

Searching in Spotlight for dsym with UUID of 3e8efaf1440131ea99e585fb394a50ea

Running mdfind "com_apple_xcode_dsym_uuids == 3E8EFAF1-4401-31EA-99E5-85FB394A50EA"

Running mdls -name com_apple_xcode_dsym_paths \/Users\/jenkinsslave\/Documents\/CrashSpider\/dSYM\/com\.xxxxxx\.iphoneclient\/50037\/dsym\/MyApp\.app\.dSYM

@dsym_paths = ( /Users/jenkinsslave/Documents/CrashSpider/dSYM/com.xxxxxx.iphoneclient/50037/dsym/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp )

@exec_names = ( MyApp )

Running mdfind "kMDItemContentType == com.apple.application-bundle && (kMDItemAlternateNames == 'MyApp.app' || kMDItemDisplayName == 'MyApp' || kMDItemDisplayName == 'MyApp.app')"

Running mdfind "kMDItemContentType == public.unix-executable && kMDItemDisplayName == 'MyApp'"

Did not find executable for dsym

## Warning: Can't find any unstripped binary that matches version of /private/var/mobile/Containers/Bundle/Application/EA730613-BB85-401F-AAF1-D1436CE22EA6/MyApp.app/MyApp

My question is:

  1. If dSYM has contain Debug Symbols, why it need executable binary?

  2. Why I can symbolicate manully but Xcode's symbolicatecrash not?

Ths!


Solution

  • symbolicatecrash is a perl script that internally calls atos.

    You can grab the code from https://github.com/bitstadium/QuincyKit/blob/develop/server/local/symbolicatecrash.pl (or your XCode installation directory).

    Copy it somewhere and edit it to change the line:

    print STDERR "Did not find executable for dsym\n" if $opt{v};
    return undef;
    

    Change undef to /path/to/your.app.dSYM/Contents/Resources/DWARF/YourAppName

    Then run it again and it will get you the right output. With some more work your can edit the script to do this automatically or take an additional argument instead of using mdfind...