1 # Test to verify LLDB searches for dwos with relative paths relative to the
2 # binary location, not relative to LLDB's launch location.
6 # RUN: llvm-mc --filetype=obj --triple x86_64-pc-linux %s -o %t.o
7 # RUN: llvm-objcopy --split-dwo=%T/dwo-relative-path.dwo %t.o
11 # RUN: %lldb %t.o -o "target var x" -b 2>&1 | FileCheck %s
15 .file "dwo-relative-path.cpp"
16 .file 0 "." "dwo-relative-path.cpp" md5 0xadc61d242247514c5d402d62db34b825
25 .section .debug_abbrev,"",@progbits
26 .byte 1 # Abbreviation Code
27 .byte 74 # DW_TAG_skeleton_unit
28 .byte 0 # DW_CHILDREN_no
29 .byte 16 # DW_AT_stmt_list
30 .byte 23 # DW_FORM_sec_offset
31 .byte 114 # DW_AT_str_offsets_base
32 .byte 23 # DW_FORM_sec_offset
33 .byte 27 # DW_AT_comp_dir
34 .byte 37 # DW_FORM_strx1
35 .ascii "\264B" # DW_AT_GNU_pubnames
36 .byte 25 # DW_FORM_flag_present
37 .byte 118 # DW_AT_dwo_name
38 .byte 37 # DW_FORM_strx1
39 .byte 115 # DW_AT_addr_base
40 .byte 23 # DW_FORM_sec_offset
44 .section .debug_info,"",@progbits
46 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
48 .short 5 # DWARF version number
49 .byte 4 # DWARF Unit Type
50 .byte 8 # Address Size (in bytes)
51 .long .debug_abbrev # Offset Into Abbrev. Section
52 .quad 3752513468363206953
53 .byte 1 # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
54 .long .Lline_table_start0 # DW_AT_stmt_list
55 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base
56 .byte 0 # DW_AT_comp_dir
58 .byte 1 # DW_AT_dwo_name
59 .long .Laddr_table_base0 # DW_AT_addr_base
61 .section .debug_str_offsets,"",@progbits
62 .long 12 # Length of String Offsets Set
66 .section .debug_str,"MS",@progbits,1
68 .asciz "." # string offset=0
70 .asciz "dwo-relative-path.dwo" # string offset=2
71 .section .debug_str_offsets,"",@progbits
74 .section .debug_str_offsets.dwo,"e",@progbits
75 .long 24 # Length of String Offsets Set
78 .section .debug_str.dwo,"eMS",@progbits,1
84 .asciz "clang version 13.0.0 (https://chromium.googlesource.com/external/github.com/llvm/llvm-project 6666e0d7a29c639df7a1652b6d3bf16f28edd45a)"
86 .asciz "dwo-relative-path.cpp"
88 .asciz "dwo-relative-path.dwo"
89 .section .debug_str_offsets.dwo,"e",@progbits
90 .long .Linfo_string0-.debug_str.dwo
91 .long .Linfo_string1-.debug_str.dwo
92 .long .Linfo_string2-.debug_str.dwo
93 .long .Linfo_string3-.debug_str.dwo
94 .section .debug_info.dwo,"e",@progbits
95 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
96 .Ldebug_info_dwo_start0:
97 .short 5 # DWARF version number
98 .byte 5 # DWARF Unit Type
99 .byte 8 # Address Size (in bytes)
100 .long 0 # Offset Into Abbrev. Section
101 .quad 3752513468363206953
102 .byte 1 # Abbrev [1] 0x14:0x65 DW_TAG_compile_unit
103 .byte 8 # DW_AT_producer
104 .short 33 # DW_AT_language
106 .byte 10 # DW_AT_dwo_name
107 .byte 2 # Abbrev [2] 0x1a:0xb DW_TAG_variable
109 .long 37 # DW_AT_type
111 .byte 0 # DW_AT_decl_file
112 .byte 11 # DW_AT_decl_line
113 .byte 2 # DW_AT_location
116 .byte 3 # Abbrev [3] 0x25:0x4 DW_TAG_base_type
118 .byte 5 # DW_AT_encoding
119 .byte 4 # DW_AT_byte_size
120 .byte 0 # End Of Children Mark
121 .Ldebug_info_dwo_end0:
122 .section .debug_abbrev.dwo,"e",@progbits
123 .byte 1 # Abbreviation Code
124 .byte 17 # DW_TAG_compile_unit
125 .byte 1 # DW_CHILDREN_yes
126 .byte 37 # DW_AT_producer
127 .byte 37 # DW_FORM_strx1
128 .byte 19 # DW_AT_language
129 .byte 5 # DW_FORM_data2
131 .byte 37 # DW_FORM_strx1
132 .byte 118 # DW_AT_dwo_name
133 .byte 37 # DW_FORM_strx1
136 .byte 2 # Abbreviation Code
137 .byte 52 # DW_TAG_variable
138 .byte 0 # DW_CHILDREN_no
140 .byte 37 # DW_FORM_strx1
141 .byte 73 # DW_AT_type
142 .byte 19 # DW_FORM_ref4
143 .byte 63 # DW_AT_external
144 .byte 25 # DW_FORM_flag_present
145 .byte 58 # DW_AT_decl_file
146 .byte 11 # DW_FORM_data1
147 .byte 59 # DW_AT_decl_line
148 .byte 11 # DW_FORM_data1
149 .byte 2 # DW_AT_location
150 .byte 24 # DW_FORM_exprloc
153 .byte 3 # Abbreviation Code
154 .byte 36 # DW_TAG_base_type
155 .byte 0 # DW_CHILDREN_no
157 .byte 37 # DW_FORM_strx1
158 .byte 62 # DW_AT_encoding
159 .byte 11 # DW_FORM_data1
160 .byte 11 # DW_AT_byte_size
161 .byte 11 # DW_FORM_data1
165 .section .debug_addr,"",@progbits
166 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
168 .short 5 # DWARF version number
169 .byte 8 # Address size
170 .byte 0 # Segment selector size
174 .section .debug_line,"",@progbits