1 ## The test checks that v5 compile units in package files read their
2 ## location tables from .debug_loclists.dwo sections.
3 ## See dwp-v2-loc.s for pre-v5 units.
5 # RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \
6 # RUN: llvm-dwarfdump -debug-info -debug-loclists - | \
9 # CHECK: .debug_info.dwo contents:
10 # CHECK: DW_TAG_compile_unit
11 # CHECK: DW_TAG_variable
12 # CHECK-NEXT: DW_AT_name ("a")
13 # CHECK-NEXT: DW_AT_location (0x{{[0-9a-f]+}}:
14 # CHECK-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000010): DW_OP_reg5 RDI)
15 # CHECK: DW_TAG_variable
16 # CHECK-NEXT: DW_AT_name ("b")
17 # CHECK-NEXT: DW_AT_location (indexed (0x1) loclist = 0x{{[0-9a-f]+}}:
18 # CHECK-NEXT: DW_LLE_startx_length (0x0000000000000005, 0x0000000000000020): DW_OP_regx RDI)
20 # CHECK: .debug_loclists.dwo contents:
21 # CHECK: locations list header:
22 # CHECK: locations list header:
24 # CHECK: 0x{{[0-9a-f]+}}:
25 # CHECK-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000010): DW_OP_reg5 RDI
26 # CHECK: 0x{{[0-9a-f]+}}:
27 # CHECK-NEXT: DW_LLE_startx_length (0x0000000000000005, 0x0000000000000020): DW_OP_regx RDI
29 .section .debug_abbrev.dwo, "e", @progbits
31 .uleb128 1 # Abbreviation Code
32 .uleb128 17 # DW_TAG_compile_unit
33 .byte 1 # DW_CHILDREN_yes
36 .uleb128 2 # Abbreviation Code
37 .uleb128 52 # DW_TAG_variable
38 .byte 0 # DW_CHILDREN_no
39 .uleb128 3 # DW_AT_name
40 .uleb128 8 # DW_FORM_string
41 .uleb128 2 # DW_AT_location
42 .uleb128 23 # DW_FORM_sec_offset
45 .uleb128 3 # Abbreviation Code
46 .uleb128 52 # DW_TAG_variable
47 .byte 0 # DW_CHILDREN_no
48 .uleb128 3 # DW_AT_name
49 .uleb128 8 # DW_FORM_string
50 .uleb128 2 # DW_AT_location
51 .uleb128 34 # DW_FORM_loclistx
57 .section .debug_info.dwo, "e", @progbits
59 .long .LCUEnd-.LCUVersion # Length of Unit
62 .byte 5 # DW_UT_split_compile
63 .byte 8 # Address size
64 .long 0 # Abbrev offset
65 .quad 0x1100001122222222 # DWO id
66 .uleb128 1 # Abbrev [1] DW_TAG_compile_unit
67 .uleb128 2 # Abbrev [2] DW_TAG_variable
68 .asciz "a" # DW_AT_name
69 .long .LLL0-.LLLBegin # DW_AT_location (DW_FORM_sec_offset)
70 .uleb128 3 # Abbrev [3] DW_TAG_variable
71 .asciz "b" # DW_AT_name
72 .uleb128 1 # DW_AT_location (DW_FORM_loclistx)
73 .byte 0 # End Of Children Mark
76 .section .debug_loclists.dwo, "e", @progbits
77 ## Start the section with an unused table to check that the reading offset
78 ## of the real table is correctly adjusted.
79 .long .LLLDummyEnd-.LLLDummyVersion # Length of Unit
82 .byte 8 # Address size
83 .byte 0 # Segment selector size
84 .long 0 # Offset entry count
85 .byte 0 # DW_LLE_end_of_list
89 .long .LLLEnd-.LLLVersion # Length of Unit
92 .byte 8 # Address size
93 .byte 0 # Segment selector size
94 .long 2 # Offset entry count
99 .byte 3 # DW_LLE_startx_length
101 .uleb128 0x10 # Length
102 .uleb128 1 # Loc expr size
103 .byte 85 # DW_OP_reg5
104 .byte 0 # DW_LLE_end_of_list
106 .byte 3 # DW_LLE_startx_length
108 .uleb128 0x20 # Length
109 .uleb128 2 # Loc expr size
110 .byte 144 # DW_OP_regx
112 .byte 0 # DW_LLE_end_of_list
115 .section .debug_cu_index, "", @progbits
119 .long 3 # Section count
122 ## Hash Table of Signatures:
123 .quad 0x1100001122222222
125 ## Parallel Table of Indexes:
128 ## Table of Section Offsets:
130 .long 1 # DW_SECT_INFO
131 .long 3 # DW_SECT_ABBREV
132 .long 5 # DW_SECT_LOCLISTS
134 .long 0 # Offset in .debug_info.dwo
135 .long 0 # Offset in .debug_abbrev.dwo
136 .long .LLLBegin-.debug_loclists.dwo # Offset in .debug_loclists.dwo
137 ## Table of Section Sizes:
138 .long .LCUEnd-.LCUBegin # Size in .debug_info.dwo
139 .long .LAbbrevEnd-.LAbbrevBegin # Size in .debug_abbrev.dwo
140 .long .LLLEnd-.LLLBegin # Size in .debug_loclists.dwo