1 ## The test checks that pre-v5 compile units in package files read their
2 ## location tables from .debug_loc.dwo sections.
3 ## See dwp-v5-loclists.s for v5 units.
5 # RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \
6 # RUN: llvm-dwarfdump -debug-info -debug-loc - | \
9 # CHECK: .debug_info.dwo contents:
10 # CHECK: DW_TAG_compile_unit
11 # CHECK-NEXT: DW_AT_GNU_dwo_id (0x1100001122222222)
12 # CHECK: DW_TAG_variable
13 # 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)
17 # CHECK: .debug_loc.dwo contents:
19 # CHECK-NEXT: DW_LLE_startx_length (0x00000001, 0x00000010): DW_OP_reg5 RDI
21 .section .debug_abbrev.dwo, "e", @progbits
23 .uleb128 1 # Abbreviation Code
24 .uleb128 17 # DW_TAG_compile_unit
25 .byte 1 # DW_CHILDREN_yes
26 .uleb128 0x2131 # DW_AT_GNU_dwo_id
27 .uleb128 7 # DW_FORM_data8
30 .uleb128 2 # Abbreviation Code
31 .uleb128 52 # DW_TAG_variable
32 .byte 0 # DW_CHILDREN_no
33 .uleb128 3 # DW_AT_name
34 .uleb128 8 # DW_FORM_string
35 .uleb128 2 # DW_AT_location
36 .uleb128 23 # DW_FORM_sec_offset
42 .section .debug_info.dwo, "e", @progbits
44 .long .LCUEnd-.LCUVersion # Length of Unit
47 .long 0 # Abbrev offset
48 .byte 8 # Address size
49 .uleb128 1 # Abbrev [1] DW_TAG_compile_unit
50 .quad 0x1100001122222222 # DW_AT_GNU_dwo_id
51 .uleb128 2 # Abbrev [2] DW_TAG_variable
52 .asciz "a" # DW_AT_name
53 .long 0 # DW_AT_location
54 .byte 0 # End Of Children Mark
57 .section .debug_loc.dwo, "e", @progbits
58 ## Start the section with a number of dummy DW_LLE_end_of_list entries to check
59 ## that the reading offset is correctly adjusted.
62 .byte 3 # DW_LLE_startx_length
65 .short 1 # Loc expr size
67 .byte 0 # DW_LLE_end_of_list
70 .section .debug_cu_index, "", @progbits
73 .long 3 # Section count
76 ## Hash Table of Signatures:
77 .quad 0x1100001122222222
79 ## Parallel Table of Indexes:
82 ## Table of Section Offsets:
84 .long 1 # DW_SECT_INFO
85 .long 3 # DW_SECT_ABBREV
88 .long 0 # Offset in .debug_info.dwo
89 .long 0 # Offset in .debug_abbrev.dwo
90 .long .LLocBegin-.debug_loc.dwo # Offset in .debug_loc.dwo
91 ## Table of Section Sizes:
92 .long .LCUEnd-.LCUBegin # Size in .debug_info.dwo
93 .long .LAbbrevEnd-.LAbbrevBegin # Size in .debug_abbrev.dwo
94 .long .LLocEnd-.LLocBegin # Size in .debug_loc.dwo