Crashsymbolicatecrash. py is a crashsymbolicatator. py is a crash-symbolicatator. py is a crash-symbolicatator. py is a crash-symbolicatator. py is a crash-symbolicatator. py is a crash-symbolicatator. py Symbolicatecrash is actually symbolized based on ATOS, which can parse module methods, and symbolicatecrash, which is symbolized for the entire file

Currently, there are three methods of symbolization, the simplest and most convenient is to directly drag the crash file into Xcode -> Device -> View Device Log, but this symbolization has a limitation, is that the current crash package must be made on the current machine. The system can be symbolized.

Generally, dev/beta/product/ package may not be in Arch on your own computer, so we need to save the DSYM file of each package to a unified remote server, so that each developer can directly download the corresponding version of DSYM, combined with the following two tools for symbolization

A, symbolicatecrash

Start by finding the Symbolicatecrash path through the terminal and symbolicatecrash with dSYM and the supplied crash/ IPS /beta files.

Look for the Symbolicatecrash path

find /Applications/Xcode.app -name symbolicatecrash -type f

The terminal will output the current Symbolicatecrash system platform paths, We use SharedFrameworks/DVTFoundation framework Versions/A/Resources symbolicatecrash inside.

Use:

& ./symbolicatecrash crashFilePath dsymPath > crashSymbolFilePath

Script -> Generate crash file path -> DSYm path > Output symbolic file path

Problems encountered

  1. Error: “DEVELOPER_DIR” is not defined at ./symbolicatecrash line 69.

    This is because script execution depends on the environment macro definition

    View the script code

    if(! defined($DEVELOPER_DIR)) { die “Error: “DEVELOPER_DIR” is not defined”; }

    Execute the export DEVELOPER_DIR = / Applications/Xcode. The app/Contents/Developer

  2. No crash report version in file

    The crash log format of iOS 15 has been updated, which requires the following crashsymbolicator. py to be symbolized.

  3. UUID inconsistent

    Use dwarfdump –uuid DSYM file path when you are not sure if the current crash and received DSYM are the desired packages

    To view the DSYM UUID: dwarfdump — UUID DSYm file path

    TODO:

    The terminal will list the uuid corresponding to the current DSYM, and find the corresponding Binary Images/ Header in the crash file to see if the UUID is consistent.

    In the crashLog file, slice_uUID is used to identify the uUID of the current file, which is used to compare the UUID of dSYM. I don’t know if Apple has made a format update.

Second, atos

The ATos command converts a hexadecimal address to a function name and line number that are recognizable in the source code

Method of use

atos -arch <Binary Architecture> -o <Path to dSYM file>/Contents/Resources/DWARF/<binary image name> -l <load address> <address to symbolicate>

Atos-arch instruction set -0 dSYM -L calls address symbol module address

*// explain parameters* load adress: address to symbolicate: the address to call the function

atos -o xxx.app.dSYM/Contents/Resources/DWARF/xxx -l 0x00000001c4fe7000 -arch arm64

atos -arch arm64 -o xxx.app.dSYM/Contents/Resources/DWARF/xxx -l 0x00000001c4fe7000 0x00000001a2d6e29c

*// extension about xcrun* *// xcrun can accept address to symbolicate on the way in command line.*

xcrun atos -o xxx.app.dSYM/Contents/Resources/DWARF/xxx -l 0x1040dc000 -arch arm64 0x1052c0464 __63-[GCDAsyncUdpSocket asyncResolveHost:port:withCompletionBlock:]_block_invoke.118 (in xxx) (GCDAsyncUdpSocket.m:1209) 0x104ba9094 -[BDAboutController tapButton:atIndex:] (in xxx) (BDAboutController.m:251)

Third, CrashSymbolicator. Py

Because the crash file was generated in iOS 15, I didn’t know that Apple had made this adjustment, but it had been parsing symbolicatecrash, and the terminal reported an error No crash report version in file. The new file format is resolved using crashSymbolicator.py

Xcode13 crashLog Update

  • To support the new JSON-format crash logs generated in macOS Monterey and iOS 15, Instruments includes a new CrashSymbolicator.py script. This Python 3 script replaces the symbolicatecrash utility for JSON-format logs and supports inlined frames with its default options. For more information, see: CrashSymbolicator.py --help. CrashSymbolicator.py is located in the Contents/SharedFrameworks/CoreSymbolicationDT.framework/Resources/ subdirectory within Xcode 13. (78891800)

After iOS 15, Apple provided JSON support for the format of symbolic files, so the writing mode should be adjusted for the broken files generated above iOS 15. Therefore, when symbolizing the broken files generated above iOS 15, Crashsymbolicator. py is used to parse crashsymbolicator. py is used to parse crashsymbolicator. py is used to parse crashsymbolicator. py is used to parse crashsymbolicator. py is used to parse crashsymbolicator. py

To find the

find /Applications/Xcode.app -name CrashSymbolicator -type f

Similar to using Symbolicatecrash, first find its path, the system lists the different platform sh, Switch to the last/Applications/Xcode. The app/Contents/SharedFrameworks/CoreSymbolicationDT framework Versions/A/Resources

Slightly different from symbolicatecrash, its call method supports file ordering as arguments, and it is written in Python, so use Python3 to make the call, otherwise it will report an error.

-d ‘symbol table path’ -o ‘Output symbolic path’ -p ‘Apple give crash log’

use

python3 CrashSymbolicator.py -d /dSYMs -o /xxxSymbo.crash -p /xxxCrash.ips

The resources

Do you really understand symbolization?

symbolic