This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Dwarf2, DW_CHILDREN_yes/no
- From: Torsten Mohr <tmohr at s dot netic dot de>
- To: binutils at sources dot redhat dot com
- Date: Sun, 24 Jul 2005 20:12:23 +0200
- Subject: Re: Dwarf2, DW_CHILDREN_yes/no
- References: <200507240947.33427.tmohr@s.netic.de>
Hi,
i forgot to attach some sample output of my perl script:
Below i marked some lines where DW_CHILDREN is NOT 0/1.
Best regards,
Torsten.
abbrev_code 1
tag 17 DW_TAG_compile_unit children 0
10 06 DW_AT_stmt_list DW_FORM_data4
12 01 DW_AT_high_pc DW_FORM_addr
11 01 DW_AT_low_pc DW_FORM_addr
25 0E DW_AT_producer DW_FORM_strp
13 0B DW_AT_language DW_FORM_data1
03 0E DW_AT_name DW_FORM_strp
1B 0E DW_AT_comp_dir DW_FORM_strp
00 00 UNDEF UNDEF
abbrev_code 2
tag 36 DW_TAG_base_type children 0
03 08 DW_AT_name DW_FORM_string
0B 0B DW_AT_byte_size DW_FORM_data1
3E 0B DW_AT_encoding DW_FORM_data1
00 00 UNDEF UNDEF
abbrev_code 3
tag 36 DW_TAG_base_type children 0
03 0E DW_AT_name DW_FORM_strp
0B 0B DW_AT_byte_size DW_FORM_data1
3E 0B DW_AT_encoding DW_FORM_data1
00 00 UNDEF UNDEF
abbrev_code 4
tag 22 DW_TAG_typedef children 0
03 0E DW_AT_name DW_FORM_strp
3A 0B DW_AT_decl_file DW_FORM_data1
3B 0B DW_AT_decl_line DW_FORM_data1
49 13 DW_AT_type DW_FORM_ref4
00 00 UNDEF UNDEF
abbrev_code 5
tag 46 DW_TAG_subprogram children 0
3F 0C DW_AT_external DW_FORM_flag
03 0E DW_AT_name DW_FORM_strp
3A 0B DW_AT_decl_file DW_FORM_data1
3B 05 DW_AT_decl_line DW_FORM_data2
27 0C DW_AT_prototyped DW_FORM_flag
49 13 DW_AT_type DW_FORM_ref4
11 01 DW_AT_low_pc DW_FORM_addr
12 01 DW_AT_high_pc DW_FORM_addr
40 0A DW_AT_frame_base DW_FORM_block1
00 00 UNDEF UNDEF
abbrev_code 6
tag 5 DW_TAG_formal_parameter children 3 <<<
03 08 DW_AT_name DW_FORM_string
3A 0B DW_AT_decl_file DW_FORM_data1
3B 05 DW_AT_decl_line DW_FORM_data2
49 13 DW_AT_type DW_FORM_ref4
02 0A DW_AT_location DW_FORM_block1
00 00 UNDEF UNDEF
abbrev_code 1
tag 17 DW_TAG_compile_unit children 0
10 06 DW_AT_stmt_list DW_FORM_data4
12 01 DW_AT_high_pc DW_FORM_addr
11 01 DW_AT_low_pc DW_FORM_addr
25 0E DW_AT_producer DW_FORM_strp
13 0B DW_AT_language DW_FORM_data1
03 0E DW_AT_name DW_FORM_strp
1B 0E DW_AT_comp_dir DW_FORM_strp
00 00 UNDEF UNDEF
abbrev_code 2
tag 36 DW_TAG_base_type children 0
03 0E DW_AT_name DW_FORM_strp
0B 0B DW_AT_byte_size DW_FORM_data1
3E 0B DW_AT_encoding DW_FORM_data1
00 00 UNDEF UNDEF
abbrev_code 3
tag 36 DW_TAG_base_type children 191 <<<
03 08 DW_AT_name DW_FORM_string
0B 0B DW_AT_byte_size DW_FORM_data1
3E 0B DW_AT_encoding DW_FORM_data1
00 00 UNDEF UNDEF
abbrev_code 4
tag 22 DW_TAG_typedef children 8 <<<
03 0E DW_AT_name DW_FORM_strp
3A 0B DW_AT_decl_file DW_FORM_data1
3B 0B DW_AT_decl_line DW_FORM_data1
49 13 DW_AT_type DW_FORM_ref4
00 00 UNDEF UNDEF
abbrev_code 5
tag 23 DW_TAG_union_type children 190 <<<
01 13 DW_AT_sibling DW_FORM_ref4
0B 0B DW_AT_byte_size DW_FORM_data1
3A 0B DW_AT_decl_file DW_FORM_data1
3B 05 DW_AT_decl_line DW_FORM_data2
00 00 UNDEF UNDEF
abbrev_code 6
tag 13 DW_TAG_member children 96 <<<
03 08 DW_AT_name DW_FORM_string
3A 0B DW_AT_decl_file DW_FORM_data1
3B 05 DW_AT_decl_line DW_FORM_data2
49 13 DW_AT_type DW_FORM_ref4
00 00 UNDEF UNDEF
> Hi,
>
> i wrote a perl script to interpret some DWARF2 sections of an ELF
> file. The ELF file was generated by a Greenhills toolchain.
>
> When interpreting the section .debug_abbrev, all data make sense,
> but the value that says if an entry has children does not only
> contain either 0 or 1 but also other, much higher values.
>
> According to the specification this looks not ok to me. As my
> script interprets all other data correctly i don't think that
> this is an error in my perl script.
>
> Is a different value than 0/1 ok for DW_CHILDREN in .debug_abbrev?
>
>
> Best regards,
> Torsten.