Mobile Analysis Service (MAS) supports reverse parsing on the crash logs of iOS apps with symbol table to help you locate the problem code in iOS apps, thus facilitating online exception troubleshooting. Meanwhile, MAS provides the iOS symbol table management function which helps you import, query symbol tables and perform symbol table parsing test.
About symbol table
A symbol table records the mapping relations between memory addresses and functions, file names, and line numbers. The elements in the symbol table are as follows:
<start address> <End address> <function> [<file name:line number>]
When an iOS app crashes, the crash stack in the crash log is the obfuscated binary information. The binary stack information can be reversely parsed through the symbol table, and converted into readable function names and line numbers, so the problem codes can be easily located.
Import iOS symbol table
Before you perform symbol reverse parsing on the crash log, you should upload the symbol table first. In the iOS platform, the symbol table is saved in the dSYM file which is usually named xxx.app.dSYM
. It is recommended to back up the dSYM file every time you build or release an app.
Complete the following steps to upload the iOS symbol table:
In the current directory of the dSYM file, use the Linux command
tar -czvf symbol.tgz ./xxx.app.dSYM
to compress the dSYM file into a tgz package.Log in to the mPaaS console, select the target app, and enter the Mobile Analysis Service > Performance analysis > iOS symbol table management page from the left navigation pane.
Click Import, enter the symbol table information, and upload the corresponding symbol table in the pop-up Import symbol table window.
Version: App version number.
Module Name: The name of the iOS app binary file, which is stored in the symbol table to identify the corresponding app binary file, so that users can match the app binary file with the app symbol table file.
Fill in the moduleName of the app main module here. For example, if the package is
Produce.app
, then the moduleName isProduce
.UUID: Universally Unique Identifier (UUID), a unique identifier generated by machine.
iOS app generates a UUID every time compilation occurs. To ensure that the log can be successfully parsed reversely, the UUID in the stack must be consistent with the UUID in the symbol table, that is, both UUIDs are from the same compilation. The crash stack information can be accurately parsed and restored only when the UUID in the imported symbol table is consistent with the UUID in the crash log.
Fill in the UUID of the app main module here. If there are more than one UUIDs, you can use any one of them. For example, if there are armv7 and arm64 two architectures, then there will be two UUIDs, and you can fill in any one of them. In the UUID string, the “-“ must be removed and all characters must be lowercase, for example:
b7583434dc5e377bb4d8e7b69bf4c1fb
.Upload from URL: Enter the URL of the tgz file compressed from the symbol table. If there is no symbol table file under the specified URL, an error message will be returned.
Click Import to import the symbol table.
Check the import status of the symbol table on the iOS symbol table management page. The status Done indicates that the symbol table has been successfully imported while Failed indicates import failure. If the symbol table import failed, you can try again according to the error message.
All the imported symbol tables are displayed on the symbol table management page, you can query them by app version.
Perform parsing test
Verify whether the imported symbol table file is valid through parsing test.
Complete the following steps to perform parsing test:
In the iOS symbol table list, select the target symbol table that was successfully imported, and click Parsing test under the Operations column.
In the Raw log text column, enter the crash log to be parsed, and click Parse log. Then, the Log parsing result column will display the parsed log text. If the reverse parsing failed, the corresponding error message and failure reason will appear, such as UUIDs mismatch.