例如:
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
<c> DW_AT_producer : (indirect string, offset: 0xe): GNU C1
1 5.4.0 20160609 -masm=intel -m32 -mtune=generic -march=i686 -g -fst
ack-protector-strong
<10> DW_AT_language : 12 (ANSI C99)
<11> DW_AT_name : (indirect string, offset: 0xbe): hell
o.c
<15> DW_AT_comp_dir : (indirect string, offset: 0x97): /tmp
<19> DW_AT_low_pc : 0x804840b
<1d> DW_AT_high_pc : 0x2e
<21> DW_AT_stmt_list : 0x0
<1><25>: Abbrev Number: 2 (DW_TAG_base_type)
<26> DW_AT_byte_size : 4
<27> DW_AT_encoding : 7 (unsigned)
<28> DW_AT_name : (indirect string, offset: 0x77): unsi
gned int
<1><2c>: Abbrev Number: 2 (DW_TAG_base_type)
<2d> DW_AT_byte_size : 1
<2e> DW_AT_encoding : 8 (unsigned char)
<2f> DW_AT_name : (indirect string, offset: 0x84): unsi
gned char
<1><33>: Abbrev Number: 2 (DW_TAG_base_type)
<34> DW_AT_byte_size : 2
<35> DW_AT_encoding : 7 (unsigned)
<36> DW_AT_name : (indirect string, offset: 0xa1): shor
t unsigned int
在每个 DIE 条目的开头,都有一个数字,例如<0>
,<1>
……这些数字是什么意思?似乎相同的数字表示相同的 DWARF 类型,我猜例如条目的<1>
意思是它们都是 (DW_TAG_base_type)
.