如何解码.dSYM文件到显式DWARF格式? [英] how to decode .dSYM file to explicit DWARF format?

查看:271
本文介绍了如何解码.dSYM文件到显式DWARF格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DWARF是调试信息格式。 Xcode生成的.dSYM文件包含DWARF调试信息。

DWARF is a debugging information format. The .dSYM file generated by Xcode contain the DWARF debugging information.

问题是:如何解码.dSYM文件以获取人机读取的DWARF信息,如下所示。

The Question is : how to decode the .dSYM file to get the human-readable DWARF information, which should like below.

推荐答案

在Mac OS X上,您可以使用 dwarfdump 实用程序将DWARF转储到.o文件或.dSYM包中。

On Mac OS X, you use the dwarfdump utility to dump the DWARF in .o files or in .dSYM bundles.

% dwarfdump fig7.o
----------------------------------------------------------------------
 File: fig7.o (x86_64)
----------------------------------------------------------------------
.debug_info contents:

0x00000000: Compile Unit: length = 0x00000077  version = 0x0002  abbr_offset = 0x00000000  addr_size = 0x08  (next CU at 0x0000007b)

0x0000000b: TAG_compile_unit [1] *
             AT_producer( "Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)" )
             AT_language( DW_LANG_C99 )
             AT_name( "fig7.c" )
             AT_low_pc( 0x0000000000000000 )
             AT_stmt_list( 0x00000000 )
             AT_comp_dir( "/tmp" )

0x00000026:     TAG_base_type [2]  
                 AT_name( "int" )
                 AT_encoding( DW_ATE_signed )
                 AT_byte_size( 0x04 )

0x0000002d:     TAG_variable [3]  
                 AT_name( "a" )
                 AT_type( {0x00000026} ( int ) )
                 AT_external( 0x01 )
                 AT_decl_file( "/private/tmp/fig7.c" )
                 AT_decl_line( 1 )
                 AT_location( [0x0000000000000000] )

0x00000043:     TAG_subprogram [4] *
                 AT_name( "foo" )
                 AT_decl_file( "/private/tmp/fig7.c" )
                 AT_decl_line( 2 )
                 AT_external( 0x01 )
                 AT_low_pc( 0x0000000000000000 )
                 AT_high_pc( 0x0000000000000006 )
                 AT_frame_base( rbp )

0x0000005d:         TAG_variable [5]  
                     AT_name( "b" )
                     AT_decl_file( "/private/tmp/fig7.c" )
                     AT_decl_line( 4 )
                     AT_type( {0x00000026} ( int ) )
                     AT_location( fbreg -4 )

0x0000006b:         TAG_variable [5]  
                     AT_name( "c" )
                     AT_decl_file( "/private/tmp/fig7.c" )
                     AT_decl_line( 5 )
                     AT_type( {0x00000026} ( int ) )
                     AT_location( fbreg -8 )

0x00000079:         NULL

0x0000007a:     NULL

这篇关于如何解码.dSYM文件到显式DWARF格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆