What is a symbol table? A symbol table is a mapping table that contains memory addresses, function names, file names, and line numbers. Symbol table elements are as follows:
<start address> <end address> <function> [<file name:line number>]
What is a symbol table for?
To locate the code where a crash happened in the user’s app quickly and accurately, CrashSight uses symbol tables to analyze and retrace the crash stack. For example:
The symbol table tool is a tool CrashSight offers developers to extract symbol table files (.symbol). If the project doesn’t contain Native code, but has used ProGuard to obfuscate code, just upload the Mapping file generated by ProGuard. The symbol table also supports uploading Mapping files. The way to do it is explained below.
The symbol table tool requires Java SE Runtime Environment under 64bit. JRE and JDK version 1.6 and above.
Download Symbol Table Tool open in new window (Download is unavailable due to an ongoing internal review. To download it, please contact crashsight@tencent.com)
jar -jar <JAR file> [-option <parameter>]
Option | Note |
---|---|
-i | Assign a file path. It can be a directory (For Windows symbol tables, you can only specify directories) |
-p | Platform type: aos/ios/win |
-o | Assign a path for outputting symbol table zip files. It must be a zip file (Windows symbol tables are output to a temporary directory, and cannot be assigned a directory) |
-d | Debugging mode switch (off by default) |
-s | Assign a configuration file (the setting.txt file under the Jar directory is read by default) |
-u | Upload switch |
-url | Upload URL |
-id | App ID |
-key | App Key |
-package | App package name |
-version | App version |
-channel | App channel (optional) |
-mapping | Mapping file (optional) |
-symbol | Generate symbol file (optional) |
-m | Generation mode. Fill in “win” or “ori” (“win” by default. Only supports windows symbol tables.) |
Note that the symbol table tool of this version doesn’t generate .sym files by default. To get .sym files, specify the “-symbol” parameter before running the symbol table tool.
URL for reporting:
Here is a usage example. Change it according to your project’s needs.
Example:
Operating system: Windows
Directory of Debug SO: E:\Projects\Demo\obj
App ID: 9000012345
App Key: abcdefghijk
App Package Name: com.batman.demo
App Version: 2.3.1
Use the symbol table tool’s JAR file to generate the symbol table file and upload automatically. The command is as follows:
java -jar crashSightSymbolAndroid.jar -i E:\Projects\Demo\obj -u -id 900012345 -key abcdefghijk -package com.batman.demo -version 2.3.1 -url https://crashsight.wetest.net/openapi/file/upload/symbol
Note: In the example above, the overseas reporting url address is used. To upload to a domestic environment, please replace it with: https://api.crashsight.qq.com/openapi/file/upload/symbol
Example:
Operating system: Windows
Android project directory: E:\Projects\Demo
App ID: 9000012345
App Key: abcdefghijk
App Package Name::com.batman.demo
App Version: 2.3.1
Use the symbol table tool to upload Mapping files. The command is as follows:
java -jar crashSightSymbolAndroid.jar -mapping E:\Projects\Demo\Mapping\mapping.txt -u -id 900012345 -key abcdefghijk -package com.batman.demo -version 2.3.1 -channel tencent -url https://crashsight.wetest.net/openapi/file/upload/symbol
Note: In the example above, the overseas reporting url address is used. To upload to a domestic environment, please replace it with: https://api.crashsight.qq.com/openapi/file/upload/symbol
What is the input file of symbol table tool?
For Android, input .so files with debugging info. For iOS, input dsym files
What is a symbol table’s UUID?
UUID is a built-in property of so/dsym. For one single file, its value remains the same.
Does uploading a symbol table overwrite the previous table?
The previous table will be overwritten if the two tables share the same UUID, but retained if the UUIDs are different.
After using the symbol table uploading tool, how can I know whether the upload is successful?
Usually, the upload is successful as long as the symbol table tool is executed. You can also check on the page whether the symbol table of the corresponding version has been uploaded.
How would I know it when the uploading tool needs an update? And how to update it?
If the update is optional, it will be included in this document. If the update is a must, users will be notified via the communication channel provided upon Integration.