Search code examples
objective-ccocoagdbcrash-dumpsdebug-symbols

Why does GDB say "no line number info available" when symbolizing a crash dump using dSYM file?


I built a Mac OS X application which is configured to strip the debug info for Release and create the dSYM files.

(Project is configured as described here: http://bit.ly/tJEQml a cached version of http:/developer.apple.com/tools/xcode/symbolizingcrashdumps.html which does exist anymore)

As expected the generated crash reports for my app don't show line information for the stack trace of my apps internal calls.

When analyzing a crash report I just can't get GDB or atos to give me line information for the stack-trace.

Crash report excerpt:

0   CoreFoundation          0x00007fff920f7286 __exceptionPreprocess + 198
1   libobjc.A.dylib         0x00007fff91f74d5e objc_exception_throw + 43
2   CoreFoundation          0x00007fff920f70ba +[NSException raise:format:arguments:] + 106
3   CoreFoundation          0x00007fff920f7044 +[NSException raise:format:] + 116
4   CoreFoundation          0x00007fff920b429b -[__NSCFDictionary setObject:forKey:] + 219
5   AppName                 0x00000001015e9c61 AppName + 85089

I tried on GDB by doing the following:

  1. called gdb -arch x86_64
  2. loaded the app using the file command (tried both the AppName.app and Content/MacOS/AppName)
  3. GDB prompts that the symbols where loaded (even tried loading the dSYM with file)
  4. called info line * 0x00000001015e9c61
  5. GDB responds with No line number information available for address 0x1015e9c61

I tried with atos by doing the following:

  1. called atos -arch x86_64 -o AppName.app (also tried to the binary directly and to the dSYM's DWARF file)
  2. typed 0x00000001015e9c61 and hit enter
  3. atos simply repeats 0x00000001015e9c61

What could be wrong?

The symbols seem to load properly (at leasts that's what gdb reports) and I'm certain the crash, dSYM and App bundle all match.


Solution

  • I still haven't figured out how to make the manual symbolizing work but I found a nice script which will do it automatically.

    The script can be found at: https://github.com/nikyoudale/symbolicatecrash-mac

    I will read through the script's code to figure out what it's doing and answer my own question.