How can I look up symbols in XCode archives?

334 views Asked by At

How can I look up symbols (eg. 0x10534843f) in programs archived with XCode?

1

There are 1 answers

0
Jakob Egger On
  1. Right click on the archive in the organizer in XCode, select “Show in Finder”
  2. Open a Terminal in the folder
  3. Type lldb to start the debugger
  4. load the executable with debug symbols: target create --no-dependents --arch x86_64 Products/Applications/MyApp.app/Contents/MacOS/MyApp --symfile dSYMs/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp (make sure you use the correct paths; if you provide an incorrect symfile, you'll receive no warning)
  5. Type image list and validate the UUID of the binary matches your crash report to make sure you're looking at the right archive (see loaded images section at the bottom of crash/sample report)
  6. Load the image at the correct location: target modules load --file Products/Applications/MyApp.app/Contents/MacOS/MyApp __TEXT 0x123456 (replace 0x123456 with the load address from the report)
  7. Now you can look up symbols using image lookup -a 0x105346367
  8. Use the verbose option to show more details: image lookup -v -a 0x105346367