DWARF(DebuggingWith Arbitrary Record Formats),是ELF和Mach-O等文件格式中用来存储和处理调试信息的标准格式,.dSYM中真正保存符号表数据的是DWARF文件。DWARF中不同的数据都保存在相应的section(节)中,ELF文件里所有的section名称都以".debug_"开头,如下表所示:
12345678910111213
| Section Name | Contents |
| -------------------- | ------------------------------------------------ |
| .debug_abbrev | Abbreviations used in the .debug_info section |
| .debug_aranges | A mapping between memory address and compilation |
| .debug_frame | Call Frame Information |
| .debug_info | The core DWARF data containing DIEs |
| .debug_line | Line Number Program |
| .debug_loc | Macro descriptions |
| .debug_macinfo | A lookup table for global objects and functions |
| .debug_pubnames | A lookup table for global objects and functions |
| .debug_pubtypes | A lookup table for global types |
| .debug_ranges | Address ranges referenced by DIEs |
| .debug_str | String table used by .debug_info |
.debug_info中最基本的描述单元为DIE(Debug Information Entry),详情请参考DWARF官方网站,首先我们要根据符号表崩溃地址0x52846从.debug_info中取出包含这个地址的DIE单元。为了简单起见,直接贴出了从info-e.txt中取出的对应DIE,其部分内容如下: