brintos

brintos / llvm-project-archived public Read only

0
0
Text · 14.9 KiB · 81ea18f Raw
319 lines · plain
1# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t.o %s2# RUN: llvm-jitlink -num-threads=0 -debug-only=orc -noexec -debugger-support \3# RUN:              %t.o 2>&1 \4# RUN:              | FileCheck %s5#6# REQUIRES: asserts && system-darwin7#8# Test that source file names can be indentified from DWARF line tables.9 10# CHECK: Using FileName = "check-dwarf-filename.c" from DWARF line table11 12	.section	__TEXT,__text,regular,pure_instructions13	.build_version macos, 15, 0	sdk_version 15, 014	.globl	_main                           ## -- Begin function main15	.p2align	4, 0x9016_main:                                  ## @main17Lfunc_begin0:18	.file	0 "/Users/lhames/Projects/scratch" "check-dwarf-filename.c" md5 0x331a6c7ae0cfcd2896eca60ac6f5703e19	.loc	0 1 0                           ## check-dwarf-filename.c:1:020	.cfi_startproc21## %bb.0:22	##DEBUG_VALUE: main:argc <- $edi23	##DEBUG_VALUE: main:argv <- $rsi24	pushq	%rbp25	.cfi_def_cfa_offset 1626	.cfi_offset %rbp, -1627	movq	%rsp, %rbp28	.cfi_def_cfa_register %rbp29Ltmp0:30	.loc	0 2 3 prologue_end              ## check-dwarf-filename.c:2:331	xorl	%eax, %eax32	.loc	0 2 3 epilogue_begin is_stmt 0  ## check-dwarf-filename.c:2:333	popq	%rbp34	retq35Ltmp1:36Lfunc_end0:37	.cfi_endproc38                                        ## -- End function39	.section	__DWARF,__debug_abbrev,regular,debug40Lsection_abbrev:41	.byte	1                               ## Abbreviation Code42	.byte	17                              ## DW_TAG_compile_unit43	.byte	1                               ## DW_CHILDREN_yes44	.byte	37                              ## DW_AT_producer45	.byte	37                              ## DW_FORM_strx146	.byte	19                              ## DW_AT_language47	.byte	5                               ## DW_FORM_data248	.byte	3                               ## DW_AT_name49	.byte	37                              ## DW_FORM_strx150	.ascii	"\202|"                         ## DW_AT_LLVM_sysroot51	.byte	37                              ## DW_FORM_strx152	.ascii	"\357\177"                      ## DW_AT_APPLE_sdk53	.byte	37                              ## DW_FORM_strx154	.byte	114                             ## DW_AT_str_offsets_base55	.byte	23                              ## DW_FORM_sec_offset56	.byte	16                              ## DW_AT_stmt_list57	.byte	23                              ## DW_FORM_sec_offset58	.byte	27                              ## DW_AT_comp_dir59	.byte	37                              ## DW_FORM_strx160	.ascii	"\341\177"                      ## DW_AT_APPLE_optimized61	.byte	25                              ## DW_FORM_flag_present62	.byte	17                              ## DW_AT_low_pc63	.byte	27                              ## DW_FORM_addrx64	.byte	18                              ## DW_AT_high_pc65	.byte	6                               ## DW_FORM_data466	.byte	115                             ## DW_AT_addr_base67	.byte	23                              ## DW_FORM_sec_offset68	.byte	0                               ## EOM(1)69	.byte	0                               ## EOM(2)70	.byte	2                               ## Abbreviation Code71	.byte	46                              ## DW_TAG_subprogram72	.byte	1                               ## DW_CHILDREN_yes73	.byte	17                              ## DW_AT_low_pc74	.byte	27                              ## DW_FORM_addrx75	.byte	18                              ## DW_AT_high_pc76	.byte	6                               ## DW_FORM_data477	.byte	64                              ## DW_AT_frame_base78	.byte	24                              ## DW_FORM_exprloc79	.byte	122                             ## DW_AT_call_all_calls80	.byte	25                              ## DW_FORM_flag_present81	.byte	3                               ## DW_AT_name82	.byte	37                              ## DW_FORM_strx183	.byte	58                              ## DW_AT_decl_file84	.byte	11                              ## DW_FORM_data185	.byte	59                              ## DW_AT_decl_line86	.byte	11                              ## DW_FORM_data187	.byte	39                              ## DW_AT_prototyped88	.byte	25                              ## DW_FORM_flag_present89	.byte	73                              ## DW_AT_type90	.byte	19                              ## DW_FORM_ref491	.byte	63                              ## DW_AT_external92	.byte	25                              ## DW_FORM_flag_present93	.ascii	"\341\177"                      ## DW_AT_APPLE_optimized94	.byte	25                              ## DW_FORM_flag_present95	.byte	0                               ## EOM(1)96	.byte	0                               ## EOM(2)97	.byte	3                               ## Abbreviation Code98	.byte	5                               ## DW_TAG_formal_parameter99	.byte	0                               ## DW_CHILDREN_no100	.byte	2                               ## DW_AT_location101	.byte	24                              ## DW_FORM_exprloc102	.byte	3                               ## DW_AT_name103	.byte	37                              ## DW_FORM_strx1104	.byte	58                              ## DW_AT_decl_file105	.byte	11                              ## DW_FORM_data1106	.byte	59                              ## DW_AT_decl_line107	.byte	11                              ## DW_FORM_data1108	.byte	73                              ## DW_AT_type109	.byte	19                              ## DW_FORM_ref4110	.byte	0                               ## EOM(1)111	.byte	0                               ## EOM(2)112	.byte	4                               ## Abbreviation Code113	.byte	36                              ## DW_TAG_base_type114	.byte	0                               ## DW_CHILDREN_no115	.byte	3                               ## DW_AT_name116	.byte	37                              ## DW_FORM_strx1117	.byte	62                              ## DW_AT_encoding118	.byte	11                              ## DW_FORM_data1119	.byte	11                              ## DW_AT_byte_size120	.byte	11                              ## DW_FORM_data1121	.byte	0                               ## EOM(1)122	.byte	0                               ## EOM(2)123	.byte	5                               ## Abbreviation Code124	.byte	15                              ## DW_TAG_pointer_type125	.byte	0                               ## DW_CHILDREN_no126	.byte	73                              ## DW_AT_type127	.byte	19                              ## DW_FORM_ref4128	.byte	0                               ## EOM(1)129	.byte	0                               ## EOM(2)130	.byte	0                               ## EOM(3)131	.section	__DWARF,__debug_info,regular,debug132Lsection_info:133Lcu_begin0:134.set Lset0, Ldebug_info_end0-Ldebug_info_start0 ## Length of Unit135	.long	Lset0136Ldebug_info_start0:137	.short	5                               ## DWARF version number138	.byte	1                               ## DWARF Unit Type139	.byte	8                               ## Address Size (in bytes)140.set Lset1, Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section141	.long	Lset1142	.byte	1                               ## Abbrev [1] 0xc:0x50 DW_TAG_compile_unit143	.byte	0                               ## DW_AT_producer144	.short	29                              ## DW_AT_language145	.byte	1                               ## DW_AT_name146	.byte	2                               ## DW_AT_LLVM_sysroot147	.byte	3                               ## DW_AT_APPLE_sdk148.set Lset2, Lstr_offsets_base0-Lsection_str_off ## DW_AT_str_offsets_base149	.long	Lset2150.set Lset3, Lline_table_start0-Lsection_line ## DW_AT_stmt_list151	.long	Lset3152	.byte	4                               ## DW_AT_comp_dir153                                        ## DW_AT_APPLE_optimized154	.byte	0                               ## DW_AT_low_pc155.set Lset4, Lfunc_end0-Lfunc_begin0     ## DW_AT_high_pc156	.long	Lset4157.set Lset5, Laddr_table_base0-Lsection_info0 ## DW_AT_addr_base158	.long	Lset5159	.byte	2                               ## Abbrev [2] 0x25:0x24 DW_TAG_subprogram160	.byte	0                               ## DW_AT_low_pc161.set Lset6, Lfunc_end0-Lfunc_begin0     ## DW_AT_high_pc162	.long	Lset6163	.byte	1                               ## DW_AT_frame_base164	.byte	86165                                        ## DW_AT_call_all_calls166	.byte	5                               ## DW_AT_name167	.byte	0                               ## DW_AT_decl_file168	.byte	1                               ## DW_AT_decl_line169                                        ## DW_AT_prototyped170	.long	73                              ## DW_AT_type171                                        ## DW_AT_external172                                        ## DW_AT_APPLE_optimized173	.byte	3                               ## Abbrev [3] 0x34:0xa DW_TAG_formal_parameter174	.byte	1                               ## DW_AT_location175	.byte	85176	.byte	7                               ## DW_AT_name177	.byte	0                               ## DW_AT_decl_file178	.byte	1                               ## DW_AT_decl_line179	.long	73                              ## DW_AT_type180	.byte	3                               ## Abbrev [3] 0x3e:0xa DW_TAG_formal_parameter181	.byte	1                               ## DW_AT_location182	.byte	84183	.byte	8                               ## DW_AT_name184	.byte	0                               ## DW_AT_decl_file185	.byte	1                               ## DW_AT_decl_line186	.long	77                              ## DW_AT_type187	.byte	0                               ## End Of Children Mark188	.byte	4                               ## Abbrev [4] 0x49:0x4 DW_TAG_base_type189	.byte	6                               ## DW_AT_name190	.byte	5                               ## DW_AT_encoding191	.byte	4                               ## DW_AT_byte_size192	.byte	5                               ## Abbrev [5] 0x4d:0x5 DW_TAG_pointer_type193	.long	82                              ## DW_AT_type194	.byte	5                               ## Abbrev [5] 0x52:0x5 DW_TAG_pointer_type195	.long	87                              ## DW_AT_type196	.byte	4                               ## Abbrev [4] 0x57:0x4 DW_TAG_base_type197	.byte	9                               ## DW_AT_name198	.byte	6                               ## DW_AT_encoding199	.byte	1                               ## DW_AT_byte_size200	.byte	0                               ## End Of Children Mark201Ldebug_info_end0:202	.section	__DWARF,__debug_str_offs,regular,debug203Lsection_str_off:204	.long	44                              ## Length of String Offsets Set205	.short	5206	.short	0207Lstr_offsets_base0:208	.section	__DWARF,__debug_str,regular,debug209Linfo_string:210	.asciz	"Apple clang version 16.0.0 (clang-1600.0.26.3)" ## string offset=0211	.asciz	"check-dwarf-filename.c"        ## string offset=47212	.asciz	"/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk" ## string offset=70213	.asciz	"MacOSX15.0.sdk"                ## string offset=126214	.asciz	"/Users/lhames/Projects/scratch" ## string offset=141215	.asciz	"main"                          ## string offset=172216	.asciz	"int"                           ## string offset=177217	.asciz	"argc"                          ## string offset=181218	.asciz	"argv"                          ## string offset=186219	.asciz	"char"                          ## string offset=191220	.section	__DWARF,__debug_str_offs,regular,debug221	.long	0222	.long	47223	.long	70224	.long	126225	.long	141226	.long	172227	.long	177228	.long	181229	.long	186230	.long	191231	.section	__DWARF,__debug_addr,regular,debug232Lsection_info0:233.set Lset7, Ldebug_addr_end0-Ldebug_addr_start0 ## Length of contribution234	.long	Lset7235Ldebug_addr_start0:236	.short	5                               ## DWARF version number237	.byte	8                               ## Address size238	.byte	0                               ## Segment selector size239Laddr_table_base0:240	.quad	Lfunc_begin0241Ldebug_addr_end0:242	.section	__DWARF,__debug_names,regular,debug243Ldebug_names_begin:244.set Lset8, Lnames_end0-Lnames_start0   ## Header: unit length245	.long	Lset8246Lnames_start0:247	.short	5                               ## Header: version248	.short	0                               ## Header: padding249	.long	1                               ## Header: compilation unit count250	.long	0                               ## Header: local type unit count251	.long	0                               ## Header: foreign type unit count252	.long	3                               ## Header: bucket count253	.long	3                               ## Header: name count254.set Lset9, Lnames_abbrev_end0-Lnames_abbrev_start0 ## Header: abbreviation table size255	.long	Lset9256	.long	8                               ## Header: augmentation string size257	.ascii	"LLVM0700"                      ## Header: augmentation string258.set Lset10, Lcu_begin0-Lsection_info   ## Compilation unit 0259	.long	Lset10260	.long	0                               ## Bucket 0261	.long	1                               ## Bucket 1262	.long	2                               ## Bucket 2263	.long	2090499946                      ## Hash in Bucket 1264	.long	193495088                       ## Hash in Bucket 2265	.long	2090147939                      ## Hash in Bucket 2266	.long	172                             ## String in Bucket 1: main267	.long	177                             ## String in Bucket 2: int268	.long	191                             ## String in Bucket 2: char269.set Lset11, Lnames0-Lnames_entries0    ## Offset in Bucket 1270	.long	Lset11271.set Lset12, Lnames1-Lnames_entries0    ## Offset in Bucket 2272	.long	Lset12273.set Lset13, Lnames2-Lnames_entries0    ## Offset in Bucket 2274	.long	Lset13275Lnames_abbrev_start0:276	.ascii	"\230."                         ## Abbrev code277	.byte	46                              ## DW_TAG_subprogram278	.byte	3                               ## DW_IDX_die_offset279	.byte	19                              ## DW_FORM_ref4280	.byte	4                               ## DW_IDX_parent281	.byte	25                              ## DW_FORM_flag_present282	.byte	0                               ## End of abbrev283	.byte	0                               ## End of abbrev284	.ascii	"\230$"                         ## Abbrev code285	.byte	36                              ## DW_TAG_base_type286	.byte	3                               ## DW_IDX_die_offset287	.byte	19                              ## DW_FORM_ref4288	.byte	4                               ## DW_IDX_parent289	.byte	25                              ## DW_FORM_flag_present290	.byte	0                               ## End of abbrev291	.byte	0                               ## End of abbrev292	.byte	0                               ## End of abbrev list293Lnames_abbrev_end0:294Lnames_entries0:295Lnames0:296L1:297	.ascii	"\230."                         ## Abbreviation code298	.long	37                              ## DW_IDX_die_offset299	.byte	0                               ## DW_IDX_parent300                                        ## End of list: main301Lnames1:302L0:303	.ascii	"\230$"                         ## Abbreviation code304	.long	73                              ## DW_IDX_die_offset305	.byte	0                               ## DW_IDX_parent306                                        ## End of list: int307Lnames2:308L2:309	.ascii	"\230$"                         ## Abbreviation code310	.long	87                              ## DW_IDX_die_offset311	.byte	0                               ## DW_IDX_parent312                                        ## End of list: char313	.p2align	2, 0x0314Lnames_end0:315.subsections_via_symbols316	.section	__DWARF,__debug_line,regular,debug317Lsection_line:318Lline_table_start0:319