brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.7 KiB · 2c9c584 Raw
177 lines · plain
1# Test to verify LLDB searches for dwos with relative paths relative to the2# binary location, not relative to LLDB's launch location.3 4# REQUIRES: x865 6# RUN: mkdir -p %t.dir7# RUN: llvm-mc --filetype=obj --triple x86_64-pc-linux %s -o %t.dir/obj.o8# RUN: llvm-objcopy --split-dwo=%t.dir/dwo-relative-path.dwo %t.dir/obj.o9 10# RUN: cd ../..11 12# RUN: %lldb %t.dir/obj.o -o "target var x" -b 2>&1 | FileCheck %s13 14# CHECK: x = 1015 16	.file	"dwo-relative-path.cpp"17	.file	0 "." "dwo-relative-path.cpp" md5 0xadc61d242247514c5d402d62db34b82518	.type	x,@object                       # @x19	.data20	.globl	x21	.p2align	222x:23	.long	10                              # 0xa24	.size	x, 425 26	.section	.debug_abbrev,"",@progbits27	.byte	1                               # Abbreviation Code28	.byte	74                              # DW_TAG_skeleton_unit29	.byte	0                               # DW_CHILDREN_no30	.byte	16                              # DW_AT_stmt_list31	.byte	23                              # DW_FORM_sec_offset32	.byte	114                             # DW_AT_str_offsets_base33	.byte	23                              # DW_FORM_sec_offset34	.byte	27                              # DW_AT_comp_dir35	.byte	37                              # DW_FORM_strx136	.ascii	"\264B"                         # DW_AT_GNU_pubnames37	.byte	25                              # DW_FORM_flag_present38	.byte	118                             # DW_AT_dwo_name39	.byte	37                              # DW_FORM_strx140	.byte	115                             # DW_AT_addr_base41	.byte	23                              # DW_FORM_sec_offset42	.byte	0                               # EOM(1)43	.byte	0                               # EOM(2)44	.byte	0                               # EOM(3)45	.section	.debug_info,"",@progbits46.Lcu_begin0:47	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit48.Ldebug_info_start0:49	.short	5                               # DWARF version number50	.byte	4                               # DWARF Unit Type51	.byte	8                               # Address Size (in bytes)52	.long	.debug_abbrev                   # Offset Into Abbrev. Section53	.quad	375251346836320695354	.byte	1                               # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit55	.long	.Lline_table_start0             # DW_AT_stmt_list56	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base57	.byte	0                               # DW_AT_comp_dir58                                        # DW_AT_GNU_pubnames59	.byte	1                               # DW_AT_dwo_name60	.long	.Laddr_table_base0              # DW_AT_addr_base61.Ldebug_info_end0:62	.section	.debug_str_offsets,"",@progbits63	.long	12                              # Length of String Offsets Set64	.short	565	.short	066.Lstr_offsets_base0:67	.section	.debug_str,"MS",@progbits,168.Lskel_string0:69	.asciz	"."                             # string offset=070.Lskel_string1:71	.asciz	"dwo-relative-path.dwo"         # string offset=272	.section	.debug_str_offsets,"",@progbits73	.long	.Lskel_string074	.long	.Lskel_string175	.section	.debug_str_offsets.dwo,"e",@progbits76	.long	24                              # Length of String Offsets Set77	.short	578	.short	079	.section	.debug_str.dwo,"eMS",@progbits,180.Linfo_string0:81	.asciz	"x"82.Linfo_string1:83	.asciz	"int"84.Linfo_string2:85	.asciz	"clang version 13.0.0 (https://chromium.googlesource.com/external/github.com/llvm/llvm-project 6666e0d7a29c639df7a1652b6d3bf16f28edd45a)"86.Linfo_string3:87	.asciz	"dwo-relative-path.cpp"88.Linfo_string10:89	.asciz	"dwo-relative-path.dwo"90	.section	.debug_str_offsets.dwo,"e",@progbits91	.long	.Linfo_string0-.debug_str.dwo92	.long	.Linfo_string1-.debug_str.dwo93	.long	.Linfo_string2-.debug_str.dwo94	.long	.Linfo_string3-.debug_str.dwo95	.section	.debug_info.dwo,"e",@progbits96	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit97.Ldebug_info_dwo_start0:98	.short	5                               # DWARF version number99	.byte	5                               # DWARF Unit Type100	.byte	8                               # Address Size (in bytes)101	.long	0                               # Offset Into Abbrev. Section102	.quad	3752513468363206953103	.byte	1                               # Abbrev [1] 0x14:0x65 DW_TAG_compile_unit104	.byte	8                               # DW_AT_producer105	.short	33                              # DW_AT_language106	.byte	9                               # DW_AT_name107	.byte	10                              # DW_AT_dwo_name108	.byte	2                               # Abbrev [2] 0x1a:0xb DW_TAG_variable109	.byte	0                               # DW_AT_name110	.long	37                              # DW_AT_type111                                        # DW_AT_external112	.byte	0                               # DW_AT_decl_file113	.byte	11                              # DW_AT_decl_line114	.byte	2                               # DW_AT_location115	.byte	161116	.byte	0117	.byte	3                               # Abbrev [3] 0x25:0x4 DW_TAG_base_type118	.byte	1                               # DW_AT_name119	.byte	5                               # DW_AT_encoding120	.byte	4                               # DW_AT_byte_size121	.byte	0                               # End Of Children Mark122.Ldebug_info_dwo_end0:123	.section	.debug_abbrev.dwo,"e",@progbits124	.byte	1                               # Abbreviation Code125	.byte	17                              # DW_TAG_compile_unit126	.byte	1                               # DW_CHILDREN_yes127	.byte	37                              # DW_AT_producer128	.byte	37                              # DW_FORM_strx1129	.byte	19                              # DW_AT_language130	.byte	5                               # DW_FORM_data2131	.byte	3                               # DW_AT_name132	.byte	37                              # DW_FORM_strx1133	.byte	118                             # DW_AT_dwo_name134	.byte	37                              # DW_FORM_strx1135	.byte	0                               # EOM(1)136	.byte	0                               # EOM(2)137	.byte	2                               # Abbreviation Code138	.byte	52                              # DW_TAG_variable139	.byte	0                               # DW_CHILDREN_no140	.byte	3                               # DW_AT_name141	.byte	37                              # DW_FORM_strx1142	.byte	73                              # DW_AT_type143	.byte	19                              # DW_FORM_ref4144	.byte	63                              # DW_AT_external145	.byte	25                              # DW_FORM_flag_present146	.byte	58                              # DW_AT_decl_file147	.byte	11                              # DW_FORM_data1148	.byte	59                              # DW_AT_decl_line149	.byte	11                              # DW_FORM_data1150	.byte	2                               # DW_AT_location151	.byte	24                              # DW_FORM_exprloc152	.byte	0                               # EOM(1)153	.byte	0                               # EOM(2)154	.byte	3                               # Abbreviation Code155	.byte	36                              # DW_TAG_base_type156	.byte	0                               # DW_CHILDREN_no157	.byte	3                               # DW_AT_name158	.byte	37                              # DW_FORM_strx1159	.byte	62                              # DW_AT_encoding160	.byte	11                              # DW_FORM_data1161	.byte	11                              # DW_AT_byte_size162	.byte	11                              # DW_FORM_data1163	.byte	0                               # EOM(1)164	.byte	0                               # EOM(2)165	.byte	0                               # EOM(3)166	.section	.debug_addr,"",@progbits167	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution168.Ldebug_addr_start0:169	.short	5                               # DWARF version number170	.byte	8                               # Address size171	.byte	0                               # Segment selector size172.Laddr_table_base0:173	.quad	x174.Ldebug_addr_end0:175	.section	.debug_line,"",@progbits176.Lline_table_start0:177