95 lines · plain
1## The test checks that pre-v5 compile units in package files read their2## location tables from .debug_loc.dwo sections.3## See dwp-v5-loclists.s for v5 units.4 5# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \6# RUN: llvm-dwarfdump -debug-info -debug-loc - | \7# RUN: FileCheck %s8 9# CHECK: .debug_info.dwo contents:10# CHECK: DW_TAG_compile_unit11# CHECK-NEXT: DW_AT_GNU_dwo_id (0x1100001122222222)12# CHECK: DW_TAG_variable13# CHECK-NEXT: DW_AT_name ("a")14# CHECK-NEXT: DW_AT_location (0x00000000:15# CHECK-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000010): DW_OP_reg5 RDI)16 17# CHECK: .debug_loc.dwo contents:18# CHECK: 0x00000013:19# CHECK-NEXT: DW_LLE_startx_length (0x00000001, 0x00000010): DW_OP_reg5 RDI20 21.section .debug_abbrev.dwo, "e", @progbits22.LAbbrevBegin:23 .uleb128 1 # Abbreviation Code24 .uleb128 17 # DW_TAG_compile_unit25 .byte 1 # DW_CHILDREN_yes26 .uleb128 0x2131 # DW_AT_GNU_dwo_id27 .uleb128 7 # DW_FORM_data828 .byte 0 # EOM(1)29 .byte 0 # EOM(2)30 .uleb128 2 # Abbreviation Code31 .uleb128 52 # DW_TAG_variable32 .byte 0 # DW_CHILDREN_no33 .uleb128 3 # DW_AT_name34 .uleb128 8 # DW_FORM_string35 .uleb128 2 # DW_AT_location36 .uleb128 23 # DW_FORM_sec_offset37 .byte 0 # EOM(1)38 .byte 0 # EOM(2)39 .byte 0 # EOM(3)40.LAbbrevEnd:41 42 .section .debug_info.dwo, "e", @progbits43.LCUBegin:44 .long .LCUEnd-.LCUVersion # Length of Unit45.LCUVersion:46 .short 4 # Version47 .long 0 # Abbrev offset48 .byte 8 # Address size49 .uleb128 1 # Abbrev [1] DW_TAG_compile_unit50 .quad 0x1100001122222222 # DW_AT_GNU_dwo_id51 .uleb128 2 # Abbrev [2] DW_TAG_variable52 .asciz "a" # DW_AT_name53 .long 0 # DW_AT_location54 .byte 0 # End Of Children Mark55.LCUEnd:56 57.section .debug_loc.dwo, "e", @progbits58## Start the section with a number of dummy DW_LLE_end_of_list entries to check59## that the reading offset is correctly adjusted.60 .zero 0x1361.LLocBegin:62 .byte 3 # DW_LLE_startx_length63 .uleb128 1 # Index64 .long 0x10 # Length65 .short 1 # Loc expr size66 .byte 85 # DW_OP_reg567 .byte 0 # DW_LLE_end_of_list68.LLocEnd:69 70 .section .debug_cu_index, "", @progbits71## Header:72 .long 2 # Version73 .long 3 # Section count74 .long 1 # Unit count75 .long 2 # Slot count76## Hash Table of Signatures:77 .quad 0x110000112222222278 .quad 079## Parallel Table of Indexes:80 .long 181 .long 082## Table of Section Offsets:83## Row 0:84 .long 1 # DW_SECT_INFO85 .long 3 # DW_SECT_ABBREV86 .long 5 # DW_SECT_LOC87## Row 1:88 .long 0 # Offset in .debug_info.dwo89 .long 0 # Offset in .debug_abbrev.dwo90 .long .LLocBegin-.debug_loc.dwo # Offset in .debug_loc.dwo91## Table of Section Sizes:92 .long .LCUEnd-.LCUBegin # Size in .debug_info.dwo93 .long .LAbbrevEnd-.LAbbrevBegin # Size in .debug_abbrev.dwo94 .long .LLocEnd-.LLocBegin # Size in .debug_loc.dwo95