77 lines · plain
1## The test checks that we can read DWARFv5 type units in DWP files.2 3# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \4# RUN: llvm-dwarfdump -debug-info - | \5# RUN: FileCheck %s6 7# CHECK: .debug_info.dwo contents:8# CHECK: Type Unit:9# CHECK: DW_TAG_type_unit10# CHECK-NEXT: DW_AT_visibility (DW_VIS_local)11# CHECK: DW_TAG_structure_type12# CHECK-NEXT: DW_AT_name ("foo")13 14 .section .debug_abbrev.dwo, "e", @progbits15## Reserve some space in the section so that the abbreviation table for the type16## unit does not start at the beginning of the section and thus the base offset17## from the index section should be added to find the correct offset.18 .space 1619.LAbbrevBegin:20 .uleb128 1 # Abbrev code21 .uleb128 0x41 # DW_TAG_type_unit22 .byte 1 # DW_CHILDREN_yes23 .uleb128 0x17 # DW_AT_visibility24 .uleb128 0x0b # DW_FORM_data125 .byte 0 # EOM(1)26 .byte 0 # EOM(2)27 .uleb128 2 # Abbrev code28 .uleb128 0x13 # DW_TAG_structure_type29 .byte 0 # DW_CHILDREN_no30 .uleb128 0x03 # DW_AT_name31 .uleb128 0x08 # DW_FORM_string32 .byte 0 # EOM(1)33 .byte 0 # EOM(2)34 .byte 0 # EOM(3)35.LAbbrevEnd:36 37 .section .debug_info.dwo, "e", @progbits38.LTUBegin:39 .long .LTUEnd-.LTUVersion # Length of Unit40.LTUVersion:41 .short 5 # DWARF version number42 .byte 6 # DW_UT_split_type43 .byte 8 # Address Size (in bytes)44 .long 0 # Offset Into Abbrev. Section45 .quad 0x1100001122222222 # Type Signature46 .long .LTUType-.LTUBegin # Type offset47 .uleb128 1 # Abbrev [1] DW_TAG_type_unit48 .byte 1 # DW_AT_visibility49.LTUType:50 .uleb128 2 # Abbrev [2] DW_TAG_structure_type51 .asciz "foo" # DW_AT_name52.LTUEnd:53 54 .section .debug_tu_index, "", @progbits55## Header:56 .short 5 # Version57 .space 2 # Padding58 .long 2 # Section count59 .long 1 # Unit count60 .long 2 # Slot count61## Hash Table of Signatures:62 .quad 0x110000112222222263 .quad 064## Parallel Table of Indexes:65 .long 166 .long 067## Table of Section Offsets:68## Row 0:69 .long 1 # DW_SECT_INFO70 .long 3 # DW_SECT_ABBREV71## Row 1:72 .long 0 # Offset in .debug_info.dwo73 .long .LAbbrevBegin-.debug_abbrev.dwo # Offset in .debug_abbrev.dwo74## Table of Section Sizes:75 .long .LTUEnd-.LTUBegin # Size in .debug_info.dwo76 .long .LAbbrevEnd-.LAbbrevBegin # Size in .debug_abbrev.dwo77