Some dwarf "nitpicks"
Mark Wielaard
mjw at redhat.com
Mon Mar 7 13:09:24 UTC 2011
Hi,
While hunting down some issues I had with dwarf_output on the examples
in the gdb testsuite I came across some "that doesn't look like valid
dwarf" things. Most of these were already discussed off list with Petr
to make sure dwarflint knows about them. But it seems better to have a
public archive of these issues, so others can help us interpret whether
or not they are really "invalid dwarf", just confusing, or something
else.
Silly usage note. If you are seeing lots of:
error: .rela.debug_info: offset 0x6: invalid relocation 10 (<INVALID
RELOC>).
you are probably running dwarflint against old elfutils libraries. Make
sure LD_LIBRARY_PATH is explicitly set to the freshly build libraries.
dwarflint would sometimes detect some low-level dwarf datastructure
corruption but then would run some of the high-level tests anyway. That
didn't end well, because dwarflint would crash on the bad data. Petr
already fixed this on the dwarf branch.
The gdb testsuite contains a lot of "minimal dwarf" examples (mostly
written by hand. There are some assumptions that might or might not be
valid. You can get some of these also with some minimal C "program".
$ echo > empty.c
$ gcc -g -c empty.c
$ dwarflint empty.o
error: .debug_abbrev: couldn't load CU headers; assuming CUs are of
latest DWARF flavor.
error: .debug_abbrev: no abbreviations.
error: .debug_info: data not found.
$ echo "static int empty;" > empty.c
$ gcc -g -c empty.c
$ eu-dwarflint empty.o
error: .debug_line: table 0: sequence of opcodes not terminated with
DW_LNE_end_sequence.
These examples really don't have any .debug_line info, just an
short debug_line section header. Maybe gcc shouldn't output any header
at all, or maybe it should make the empty table by having only the
DW_LNE_end_sequence in it instead? Or should dwarflint ignore the table
if the header says the table is empty?
Attached are also some examples that show "bad child" marking in a dwarf
file. These can happen easily when you are writing dwarf examples by
hand (as is done in the gdb testsuite a lot). The diff of the .s files
will show that "accidentally" some DIEs were marked as not having
children but the "end of child list" markers are still there (it also
tweaks the siblings to be some other reference type, because dwarflint
does see the discrepancy in that case - go dwarflint! - except my
original didn't have sibling markers of course...).
The result is that something that relies on dwarf_siblingof will just
not see the last few DIEs. Since we are under the impression the CU is
done. This caused havoc for dwarf_output which was suddenly missing some
referenced DIEs. But you can also see that eu-readelf will just stop
early (interestingly binutils readelf will show them (but with an
indentation of zero, which is rather odd for non-CU dies).
I am hoping that since unit headers have a length and the "top-level" CU
die needs to have children that cover the whole unit dwarflint somehow
can detect that there is something odd going on with the children
relationship even if there are no sibling_AT markers. A zero or negative
"indentation level" for a DIE that isn't the top-level CU DIE should
probably cause at least a warning.
Cheers,
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello-nested.c
Type: text/x-csrc
Size: 83 bytes
Desc: not available
Url : https://fedorahosted.org/pipermail/elfutils-devel/attachments/20110307/47bc06d0/attachment.bin
-------------- next part --------------
.file "hello-nested.c"
# GNU C (GCC) version 4.5.1 20100924 (Red Hat 4.5.1-4) (x86_64-redhat-linux)
# compiled by GNU C version 4.5.1 20100924 (Red Hat 4.5.1-4), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8.1
# GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
# options passed: hello-nested.c -mtune=generic -march=x86-64 -g
# -fverbose-asm
# options enabled: -falign-loops -fargument-alias
# -fasynchronous-unwind-tables -fauto-inc-dec -fbranch-count-reg -fcommon
# -fdelete-null-pointer-checks -fdwarf2-cfi-asm -fearly-inlining
# -feliminate-unused-debug-types -ffunction-cse -fgcse-lm -fident
# -finline-functions-called-once -fira-share-save-slots
# -fira-share-spill-slots -fivopts -fkeep-static-consts
# -fleading-underscore -fmath-errno -fmerge-debug-strings
# -fmove-loop-invariants -fpeephole -freg-struct-return
# -fsched-critical-path-heuristic -fsched-dep-count-heuristic
# -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic
# -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic
# -fsched-stalled-insns-dep -fshow-column -fsigned-zeros
# -fsplit-ivs-in-unroller -ftrapping-math -ftree-cselim -ftree-forwprop
# -ftree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize
# -ftree-parallelize-loops= -ftree-phiprop -ftree-pta -ftree-reassoc
# -ftree-scev-cprop -ftree-slp-vectorize -ftree-vect-loop-version
# -funit-at-a-time -funwind-tables -fvect-cost-model -fverbose-asm
# -fzero-initialized-in-bss -m128bit-long-double -m64 -m80387
# -maccumulate-outgoing-args -malign-stringops -mfancy-math-387
# -mfp-ret-in-387 -mfused-madd -mglibc -mieee-fp -mmmx -mno-sse4
# -mpush-args -mred-zone -msse -msse2 -mtls-direct-seg-refs
.section .debug_abbrev,"", at progbits
.Ldebug_abbrev0:
.section .debug_info,"", at progbits
.Ldebug_info0:
.section .debug_line,"", at progbits
.Ldebug_line0:
.text
.Ltext0:
# Compiler executable checksum: ea394b69293dd698607206e8e43d607e
.globl main
.type main, @function
main:
.LFB0:
.file 1 "hello-nested.c"
# hello-nested.c:3
.loc 1 3 0
.cfi_startproc
# basic block 2
pushq %rbp # # 15 *pushdi2_rex64/1 [length = 1]
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp #, # 16 *movdi_1_rex64/2 [length = 3]
.cfi_def_cfa_register 6
movl %edi, -4(%rbp) # argc, argc # 2 *movsi_1/2 [length = 3]
movq %rsi, -16(%rbp) # argv, argv # 3 *movdi_1_rex64/4 [length = 4]
# hello-nested.c:6
.loc 1 6 0
leave # 21 leave_rex64 [length = 1]
.cfi_def_cfa 7, 8
ret # 22 return_internal [length = 1]
.cfi_endproc
.LFE0:
.size main, .-main
.Letext0:
.section .debug_info
.long 0xae # Length of Compilation Unit Info
.value 0x3 # DWARF version number
.long .Ldebug_abbrev0 # Offset Into Abbrev. Section
.byte 0x8 # Pointer Size (in bytes)
.uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
.long .LASF3 # DW_AT_producer: "GNU C 4.5.1 20100924 (Red Hat 4.5.1-4)"
.byte 0x1 # DW_AT_language
.long .LASF4 # DW_AT_name: "hello-nested.c"
.long .LASF5 # DW_AT_comp_dir: "/home/mark/src/tests"
.quad .Ltext0 # DW_AT_low_pc
.quad .Letext0 # DW_AT_high_pc
.long .Ldebug_line0 # DW_AT_stmt_list
.uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
.byte 0x1 # DW_AT_external
.long .LASF6 # DW_AT_name: "main"
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x2 # DW_AT_decl_line
.byte 0x1 # DW_AT_prototyped
.long 0x91 # DW_AT_type
.quad .LFB0 # DW_AT_low_pc
.quad .LFE0 # DW_AT_high_pc
.byte 0x1 # DW_AT_frame_base
.byte 0x9c # DW_OP_call_frame_cfa
.long 0x91 # DW_AT_sibling
.uleb128 0x3 # (DIE (0x50) DW_TAG_formal_parameter)
.long .LASF0 # DW_AT_name: "argc"
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x2 # DW_AT_decl_line
.long 0x91 # DW_AT_type
.byte 0x2 # DW_AT_location
.byte 0x91 # DW_OP_fbreg
.sleb128 -20
.uleb128 0x3 # (DIE (0x5e) DW_TAG_formal_parameter)
.long .LASF1 # DW_AT_name: "argv"
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x2 # DW_AT_decl_line
.long 0x98 # DW_AT_type
.byte 0x2 # DW_AT_location
.byte 0x91 # DW_OP_fbreg
.sleb128 -32
.uleb128 0x4 # (DIE (0x6c) DW_TAG_structure_type)
.ascii "foo\0" # DW_AT_name
.byte 0x4 # DW_AT_byte_size
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x4 # DW_AT_decl_line
.long 0x85 # DW_AT_sibling
.uleb128 0x5 # (DIE (0x78) DW_TAG_member)
.ascii "bar\0" # DW_AT_name
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x4 # DW_AT_decl_line
.long 0x91 # DW_AT_type
.sleb128 0 # DW_AT_data_member_location
.byte 0x0 # end of children of DIE 0x6c
.uleb128 0x6 # (DIE (0x85) DW_TAG_variable)
.ascii "baz\0" # DW_AT_name
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x5 # DW_AT_decl_line
.long 0xab # DW_AT_type
.byte 0x0 # end of children of DIE 0x2d
.uleb128 0x7 # (DIE (0x91) DW_TAG_base_type)
.byte 0x4 # DW_AT_byte_size
.byte 0x5 # DW_AT_encoding
.ascii "int\0" # DW_AT_name
.uleb128 0x8 # (DIE (0x98) DW_TAG_pointer_type)
.byte 0x8 # DW_AT_byte_size
.long 0x9e # DW_AT_type
.uleb128 0x8 # (DIE (0x9e) DW_TAG_pointer_type)
.byte 0x8 # DW_AT_byte_size
.long 0xa4 # DW_AT_type
.uleb128 0x9 # (DIE (0xa4) DW_TAG_base_type)
.byte 0x1 # DW_AT_byte_size
.byte 0x6 # DW_AT_encoding
.long .LASF2 # DW_AT_name: "char"
.uleb128 0x8 # (DIE (0xab) DW_TAG_pointer_type)
.byte 0x8 # DW_AT_byte_size
.long 0x6c # DW_AT_type
.byte 0x0 # end of children of DIE 0xb
.section .debug_abbrev
.uleb128 0x1 # (abbrev code)
.uleb128 0x11 # (TAG: DW_TAG_compile_unit)
.byte 0x1 # DW_children_yes
.uleb128 0x25 # (DW_AT_producer)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x13 # (DW_AT_language)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3 # (DW_AT_name)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x1b # (DW_AT_comp_dir)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x11 # (DW_AT_low_pc)
.uleb128 0x1 # (DW_FORM_addr)
.uleb128 0x12 # (DW_AT_high_pc)
.uleb128 0x1 # (DW_FORM_addr)
.uleb128 0x10 # (DW_AT_stmt_list)
.uleb128 0x6 # (DW_FORM_data4)
.byte 0x0
.byte 0x0
.uleb128 0x2 # (abbrev code)
.uleb128 0x2e # (TAG: DW_TAG_subprogram)
.byte 0x1 # DW_children_yes
.uleb128 0x3f # (DW_AT_external)
.uleb128 0xc # (DW_FORM_flag)
.uleb128 0x3 # (DW_AT_name)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x27 # (DW_AT_prototyped)
.uleb128 0xc # (DW_FORM_flag)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.uleb128 0x11 # (DW_AT_low_pc)
.uleb128 0x1 # (DW_FORM_addr)
.uleb128 0x12 # (DW_AT_high_pc)
.uleb128 0x1 # (DW_FORM_addr)
.uleb128 0x40 # (DW_AT_frame_base)
.uleb128 0xa # (DW_FORM_block1)
.uleb128 0x1 # (DW_AT_sibling)
.uleb128 0x13 # (DW_FORM_ref4)
.byte 0x0
.byte 0x0
.uleb128 0x3 # (abbrev code)
.uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
.byte 0x0 # DW_children_no
.uleb128 0x3 # (DW_AT_name)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.uleb128 0x2 # (DW_AT_location)
.uleb128 0xa # (DW_FORM_block1)
.byte 0x0
.byte 0x0
.uleb128 0x4 # (abbrev code)
.uleb128 0x13 # (TAG: DW_TAG_structure_type)
.byte 0x1 # DW_children_yes
.uleb128 0x3 # (DW_AT_name)
.uleb128 0x8 # (DW_FORM_string)
.uleb128 0xb # (DW_AT_byte_size)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x1 # (DW_AT_sibling)
.uleb128 0x13 # (DW_FORM_ref4)
.byte 0x0
.byte 0x0
.uleb128 0x5 # (abbrev code)
.uleb128 0xd # (TAG: DW_TAG_member)
.byte 0x0 # DW_children_no
.uleb128 0x3 # (DW_AT_name)
.uleb128 0x8 # (DW_FORM_string)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.uleb128 0x38 # (DW_AT_data_member_location)
.uleb128 0xd # (DW_FORM_sdata)
.byte 0x0
.byte 0x0
.uleb128 0x6 # (abbrev code)
.uleb128 0x34 # (TAG: DW_TAG_variable)
.byte 0x0 # DW_children_no
.uleb128 0x3 # (DW_AT_name)
.uleb128 0x8 # (DW_FORM_string)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.byte 0x0
.byte 0x0
.uleb128 0x7 # (abbrev code)
.uleb128 0x24 # (TAG: DW_TAG_base_type)
.byte 0x0 # DW_children_no
.uleb128 0xb # (DW_AT_byte_size)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3e # (DW_AT_encoding)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3 # (DW_AT_name)
.uleb128 0x8 # (DW_FORM_string)
.byte 0x0
.byte 0x0
.uleb128 0x8 # (abbrev code)
.uleb128 0xf # (TAG: DW_TAG_pointer_type)
.byte 0x0 # DW_children_no
.uleb128 0xb # (DW_AT_byte_size)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.byte 0x0
.byte 0x0
.uleb128 0x9 # (abbrev code)
.uleb128 0x24 # (TAG: DW_TAG_base_type)
.byte 0x0 # DW_children_no
.uleb128 0xb # (DW_AT_byte_size)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3e # (DW_AT_encoding)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3 # (DW_AT_name)
.uleb128 0xe # (DW_FORM_strp)
.byte 0x0
.byte 0x0
.byte 0x0
.section .debug_pubnames,"", at progbits
.long 0x17 # Length of Public Names Info
.value 0x2 # DWARF Version
.long .Ldebug_info0 # Offset of Compilation Unit Info
.long 0xb2 # Compilation Unit Length
.long 0x2d # DIE offset
.ascii "main\0" # external name
.long 0x0
.section .debug_aranges,"", at progbits
.long 0x2c # Length of Address Ranges Info
.value 0x2 # DWARF Version
.long .Ldebug_info0 # Offset of Compilation Unit Info
.byte 0x8 # Size of Address
.byte 0x0 # Size of Segment Descriptor
.value 0x0 # Pad to 16 byte boundary
.value 0x0
.quad .Ltext0 # Address
.quad .Letext0-.Ltext0 # Length
.quad 0x0
.quad 0x0
.section .debug_str,"MS", at progbits,1
.LASF5:
.string "/home/mark/src/tests"
.LASF3:
.string "GNU C 4.5.1 20100924 (Red Hat 4.5.1-4)"
.LASF0:
.string "argc"
.LASF2:
.string "char"
.LASF6:
.string "main"
.LASF4:
.string "hello-nested.c"
.LASF1:
.string "argv"
.ident "GCC: (GNU) 4.5.1 20100924 (Red Hat 4.5.1-4)"
.section .note.GNU-stack,"", at progbits
-------------- next part --------------
.file "hello-nested.c"
# GNU C (GCC) version 4.5.1 20100924 (Red Hat 4.5.1-4) (x86_64-redhat-linux)
# compiled by GNU C version 4.5.1 20100924 (Red Hat 4.5.1-4), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8.1
# GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
# options passed: hello-nested.c -mtune=generic -march=x86-64 -g
# -fverbose-asm
# options enabled: -falign-loops -fargument-alias
# -fasynchronous-unwind-tables -fauto-inc-dec -fbranch-count-reg -fcommon
# -fdelete-null-pointer-checks -fdwarf2-cfi-asm -fearly-inlining
# -feliminate-unused-debug-types -ffunction-cse -fgcse-lm -fident
# -finline-functions-called-once -fira-share-save-slots
# -fira-share-spill-slots -fivopts -fkeep-static-consts
# -fleading-underscore -fmath-errno -fmerge-debug-strings
# -fmove-loop-invariants -fpeephole -freg-struct-return
# -fsched-critical-path-heuristic -fsched-dep-count-heuristic
# -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic
# -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic
# -fsched-stalled-insns-dep -fshow-column -fsigned-zeros
# -fsplit-ivs-in-unroller -ftrapping-math -ftree-cselim -ftree-forwprop
# -ftree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize
# -ftree-parallelize-loops= -ftree-phiprop -ftree-pta -ftree-reassoc
# -ftree-scev-cprop -ftree-slp-vectorize -ftree-vect-loop-version
# -funit-at-a-time -funwind-tables -fvect-cost-model -fverbose-asm
# -fzero-initialized-in-bss -m128bit-long-double -m64 -m80387
# -maccumulate-outgoing-args -malign-stringops -mfancy-math-387
# -mfp-ret-in-387 -mfused-madd -mglibc -mieee-fp -mmmx -mno-sse4
# -mpush-args -mred-zone -msse -msse2 -mtls-direct-seg-refs
.section .debug_abbrev,"", at progbits
.Ldebug_abbrev0:
.section .debug_info,"", at progbits
.Ldebug_info0:
.section .debug_line,"", at progbits
.Ldebug_line0:
.text
.Ltext0:
# Compiler executable checksum: ea394b69293dd698607206e8e43d607e
.globl main
.type main, @function
main:
.LFB0:
.file 1 "hello-nested.c"
# hello-nested.c:3
.loc 1 3 0
.cfi_startproc
# basic block 2
pushq %rbp # # 15 *pushdi2_rex64/1 [length = 1]
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp #, # 16 *movdi_1_rex64/2 [length = 3]
.cfi_def_cfa_register 6
movl %edi, -4(%rbp) # argc, argc # 2 *movsi_1/2 [length = 3]
movq %rsi, -16(%rbp) # argv, argv # 3 *movdi_1_rex64/4 [length = 4]
# hello-nested.c:6
.loc 1 6 0
leave # 21 leave_rex64 [length = 1]
.cfi_def_cfa 7, 8
ret # 22 return_internal [length = 1]
.cfi_endproc
.LFE0:
.size main, .-main
.Letext0:
.section .debug_info
.long 0xae # Length of Compilation Unit Info
.value 0x3 # DWARF version number
.long .Ldebug_abbrev0 # Offset Into Abbrev. Section
.byte 0x8 # Pointer Size (in bytes)
.uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
.long .LASF3 # DW_AT_producer: "GNU C 4.5.1 20100924 (Red Hat 4.5.1-4)"
.byte 0x1 # DW_AT_language
.long .LASF4 # DW_AT_name: "hello-nested.c"
.long .LASF5 # DW_AT_comp_dir: "/home/mark/src/tests"
.quad .Ltext0 # DW_AT_low_pc
.quad .Letext0 # DW_AT_high_pc
.long .Ldebug_line0 # DW_AT_stmt_list
.uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
.byte 0x1 # DW_AT_external
.long .LASF6 # DW_AT_name: "main"
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x2 # DW_AT_decl_line
.byte 0x1 # DW_AT_prototyped
.long 0x91 # DW_AT_type
.quad .LFB0 # DW_AT_low_pc
.quad .LFE0 # DW_AT_high_pc
.byte 0x1 # DW_AT_frame_base
.byte 0x9c # DW_OP_call_frame_cfa
.long 0x91 # DW_AT_sibling
.uleb128 0x3 # (DIE (0x50) DW_TAG_formal_parameter)
.long .LASF0 # DW_AT_name: "argc"
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x2 # DW_AT_decl_line
.long 0x91 # DW_AT_type
.byte 0x2 # DW_AT_location
.byte 0x91 # DW_OP_fbreg
.sleb128 -20
.uleb128 0x3 # (DIE (0x5e) DW_TAG_formal_parameter)
.long .LASF1 # DW_AT_name: "argv"
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x2 # DW_AT_decl_line
.long 0x98 # DW_AT_type
.byte 0x2 # DW_AT_location
.byte 0x91 # DW_OP_fbreg
.sleb128 -32
.uleb128 0x4 # (DIE (0x6c) DW_TAG_structure_type)
.ascii "foo\0" # DW_AT_name
.byte 0x4 # DW_AT_byte_size
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x4 # DW_AT_decl_line
.long 0x85 # DW_AT_sibling
.uleb128 0x5 # (DIE (0x78) DW_TAG_member)
.ascii "bar\0" # DW_AT_name
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x4 # DW_AT_decl_line
.long 0x91 # DW_AT_type
.sleb128 0 # DW_AT_data_member_location
.byte 0x0 # end of children of DIE 0x6c
.uleb128 0x6 # (DIE (0x85) DW_TAG_variable)
.ascii "baz\0" # DW_AT_name
.byte 0x1 # DW_AT_decl_file (hello-nested.c)
.byte 0x5 # DW_AT_decl_line
.long 0xab # DW_AT_type
.byte 0x0 # end of children of DIE 0x2d
.uleb128 0x7 # (DIE (0x91) DW_TAG_base_type)
.byte 0x4 # DW_AT_byte_size
.byte 0x5 # DW_AT_encoding
.ascii "int\0" # DW_AT_name
.uleb128 0x8 # (DIE (0x98) DW_TAG_pointer_type)
.byte 0x8 # DW_AT_byte_size
.long 0x9e # DW_AT_type
.uleb128 0x8 # (DIE (0x9e) DW_TAG_pointer_type)
.byte 0x8 # DW_AT_byte_size
.long 0xa4 # DW_AT_type
.uleb128 0x9 # (DIE (0xa4) DW_TAG_base_type)
.byte 0x1 # DW_AT_byte_size
.byte 0x6 # DW_AT_encoding
.long .LASF2 # DW_AT_name: "char"
.uleb128 0x8 # (DIE (0xab) DW_TAG_pointer_type)
.byte 0x8 # DW_AT_byte_size
.long 0x6c # DW_AT_type
.byte 0x0 # end of children of DIE 0xb
.section .debug_abbrev
.uleb128 0x1 # (abbrev code)
.uleb128 0x11 # (TAG: DW_TAG_compile_unit)
.byte 0x1 # DW_children_yes
.uleb128 0x25 # (DW_AT_producer)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x13 # (DW_AT_language)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3 # (DW_AT_name)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x1b # (DW_AT_comp_dir)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x11 # (DW_AT_low_pc)
.uleb128 0x1 # (DW_FORM_addr)
.uleb128 0x12 # (DW_AT_high_pc)
.uleb128 0x1 # (DW_FORM_addr)
.uleb128 0x10 # (DW_AT_stmt_list)
.uleb128 0x6 # (DW_FORM_data4)
.byte 0x0
.byte 0x0
.uleb128 0x2 # (abbrev code)
.uleb128 0x2e # (TAG: DW_TAG_subprogram)
.byte 0x1 # DW_children_no
.uleb128 0x3f # (DW_AT_external)
.uleb128 0xc # (DW_FORM_flag)
.uleb128 0x3 # (DW_AT_name)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x27 # (DW_AT_prototyped)
.uleb128 0xc # (DW_FORM_flag)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.uleb128 0x11 # (DW_AT_low_pc)
.uleb128 0x1 # (DW_FORM_addr)
.uleb128 0x12 # (DW_AT_high_pc)
.uleb128 0x1 # (DW_FORM_addr)
.uleb128 0x40 # (DW_AT_frame_base)
.uleb128 0xa # (DW_FORM_block1)
.uleb128 0x54 # (DW_AT_extension)
.uleb128 0x13 # (DW_FORM_ref4)
.byte 0x0
.byte 0x0
.uleb128 0x3 # (abbrev code)
.uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
.byte 0x0 # DW_children_no
.uleb128 0x3 # (DW_AT_name)
.uleb128 0xe # (DW_FORM_strp)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.uleb128 0x2 # (DW_AT_location)
.uleb128 0xa # (DW_FORM_block1)
.byte 0x0
.byte 0x0
.uleb128 0x4 # (abbrev code)
.uleb128 0x13 # (TAG: DW_TAG_structure_type)
.byte 0x0 # DW_children_no
.uleb128 0x3 # (DW_AT_name)
.uleb128 0x8 # (DW_FORM_string)
.uleb128 0xb # (DW_AT_byte_size)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x54 # (DW_AT_extension)
.uleb128 0x13 # (DW_FORM_ref4)
.byte 0x0
.byte 0x0
.uleb128 0x5 # (abbrev code)
.uleb128 0xd # (TAG: DW_TAG_member)
.byte 0x0 # DW_children_no
.uleb128 0x3 # (DW_AT_name)
.uleb128 0x8 # (DW_FORM_string)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.uleb128 0x38 # (DW_AT_data_member_location)
.uleb128 0xd # (DW_FORM_sdata)
.byte 0x0
.byte 0x0
.uleb128 0x6 # (abbrev code)
.uleb128 0x34 # (TAG: DW_TAG_variable)
.byte 0x0 # DW_children_no
.uleb128 0x3 # (DW_AT_name)
.uleb128 0x8 # (DW_FORM_string)
.uleb128 0x3a # (DW_AT_decl_file)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3b # (DW_AT_decl_line)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.byte 0x0
.byte 0x0
.uleb128 0x7 # (abbrev code)
.uleb128 0x24 # (TAG: DW_TAG_base_type)
.byte 0x0 # DW_children_no
.uleb128 0xb # (DW_AT_byte_size)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3e # (DW_AT_encoding)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3 # (DW_AT_name)
.uleb128 0x8 # (DW_FORM_string)
.byte 0x0
.byte 0x0
.uleb128 0x8 # (abbrev code)
.uleb128 0xf # (TAG: DW_TAG_pointer_type)
.byte 0x0 # DW_children_no
.uleb128 0xb # (DW_AT_byte_size)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x49 # (DW_AT_type)
.uleb128 0x13 # (DW_FORM_ref4)
.byte 0x0
.byte 0x0
.uleb128 0x9 # (abbrev code)
.uleb128 0x24 # (TAG: DW_TAG_base_type)
.byte 0x0 # DW_children_no
.uleb128 0xb # (DW_AT_byte_size)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3e # (DW_AT_encoding)
.uleb128 0xb # (DW_FORM_data1)
.uleb128 0x3 # (DW_AT_name)
.uleb128 0xe # (DW_FORM_strp)
.byte 0x0
.byte 0x0
.byte 0x0
.section .debug_pubnames,"", at progbits
.long 0x17 # Length of Public Names Info
.value 0x2 # DWARF Version
.long .Ldebug_info0 # Offset of Compilation Unit Info
.long 0xb2 # Compilation Unit Length
.long 0x2d # DIE offset
.ascii "main\0" # external name
.long 0x0
.section .debug_aranges,"", at progbits
.long 0x2c # Length of Address Ranges Info
.value 0x2 # DWARF Version
.long .Ldebug_info0 # Offset of Compilation Unit Info
.byte 0x8 # Size of Address
.byte 0x0 # Size of Segment Descriptor
.value 0x0 # Pad to 16 byte boundary
.value 0x0
.quad .Ltext0 # Address
.quad .Letext0-.Ltext0 # Length
.quad 0x0
.quad 0x0
.section .debug_str,"MS", at progbits,1
.LASF5:
.string "/home/mark/src/tests"
.LASF3:
.string "GNU C 4.5.1 20100924 (Red Hat 4.5.1-4)"
.LASF0:
.string "argc"
.LASF2:
.string "char"
.LASF6:
.string "main"
.LASF4:
.string "hello-nested.c"
.LASF1:
.string "argv"
.ident "GCC: (GNU) 4.5.1 20100924 (Red Hat 4.5.1-4)"
.section .note.GNU-stack,"", at progbits
More information about the elfutils-devel
mailing list