brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.3 KiB · b8d8e18 Raw
217 lines · plain
1REQUIRES: x86-registered-target2RUN: split-file %s %t3RUN: mkdir -p %t/.build-id/ab4RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t/asm.s \5RUN:   -o %t/.build-id/ab/cdef.debug6RUN: llvm-symbolizer --debug-file-directory=%t --filter-markup < %t/input \7RUN:   > %t.output 2> %t.err8RUN: FileCheck %s --input-file=%t.output --match-full-lines \9RUN:   --implicit-check-not {{.}}10RUN: FileCheck %s --check-prefix=ERR --input-file=%t.err --match-full-lines11 12CHECK: [[BEGIN:\[{3}]]ELF module #0x0 "a.o"; BuildID=abcdef [0x10-0x10f](r)[[END:\]{3}]]13CHECK:    #0.1  0x0000000000000018 second /tmp[[SEP:[/\\]]]tmp.c:8:3 (a.o+0x8)14CHECK:    #0    0x0000000000000018 first /tmp[[SEP]]tmp.c:4:3 (a.o+0x8)15CHECK:    #1.1  0x0000000000000018 second /tmp[[SEP]]tmp.c:8:3 (a.o+0x8)16CHECK:    #1    0x0000000000000018 first /tmp[[SEP]]tmp.c:4:3 (a.o+0x8)17CHECK:    #0.1  0x0000000000000018 second /tmp[[SEP]]tmp.c:8:3 (a.o+0x8)18CHECK:    #0    0x0000000000000018 first /tmp[[SEP]]tmp.c:4:3 (a.o+0x8)19CHECK:    #0    0x0000000000000019 first /tmp[[SEP]]tmp.c:5:1 (a.o+0x9)20CHECK:    #0    0x00000000000000fe (a.o+0xee)21 22CHECK:    #0    0x00000000000000fe (a.o+0xee)23ERR: warning: expected at most 3 field(s); found 424CHECK: [[BEGIN]]bt:0:0x111[[END]]25ERR: error: no mmap covers address26 27ERR: error: expected at least 2 field(s); found 028ERR: error: expected PC type; found ''29 30;--- input31{{{module:0:a.o:elf:abcdef}}}32{{{mmap:0x10:256:load:0:r:0}}}33{{{bt:0:0x19}}}34{{{bt:1:0x19}}}35{{{bt:0:0x19:ra}}}36{{{bt:0:0x19:pc}}}37{{{bt:0:0xff}}}38 39{{{bt:0:0xff:pc:ext}}}40{{{bt:0:0x111}}}41 42{{{bt}}}43{{{bt:0:0:}}}44;--- asm.s45# Generated by running "clang -finline -g -S tmp.c" in the following tmp.c on46# Linux x86_64:47#48# static void second(void);49# void first(void) {50#   second();51# }52# void second(void) {}53	.text54	.file	"tmp.c"55	.globl	first                           # -- Begin function first56	.p2align	4, 0x9057	.type	first,@function58first:                                  # @first59.Lfunc_begin0:60	.file	1 "/tmp" "tmp.c"61	.loc	1 3 0                           # tmp.c:3:062	.cfi_startproc63# %bb.0:64	pushq	%rbp65	.cfi_def_cfa_offset 1666	.cfi_offset %rbp, -1667	movq	%rsp, %rbp68	.cfi_def_cfa_register %rbp69.Ltmp0:70	.loc	1 8 3 prologue_end              # tmp.c:8:371	callq	first72.Ltmp1:73	.loc	1 5 1                           # tmp.c:5:174	popq	%rbp75	.cfi_def_cfa %rsp, 876	retq77.Ltmp2:78.Lfunc_end0:79	.size	first, .Lfunc_end0-first80	.cfi_endproc81                                        # -- End function82	.section	.debug_abbrev,"",@progbits83	.byte	1                               # Abbreviation Code84	.byte	17                              # DW_TAG_compile_unit85	.byte	1                               # DW_CHILDREN_yes86	.byte	37                              # DW_AT_producer87	.byte	14                              # DW_FORM_strp88	.byte	19                              # DW_AT_language89	.byte	5                               # DW_FORM_data290	.byte	3                               # DW_AT_name91	.byte	14                              # DW_FORM_strp92	.byte	16                              # DW_AT_stmt_list93	.byte	23                              # DW_FORM_sec_offset94	.byte	27                              # DW_AT_comp_dir95	.byte	14                              # DW_FORM_strp96	.byte	17                              # DW_AT_low_pc97	.byte	1                               # DW_FORM_addr98	.byte	18                              # DW_AT_high_pc99	.byte	6                               # DW_FORM_data4100	.byte	0                               # EOM(1)101	.byte	0                               # EOM(2)102	.byte	2                               # Abbreviation Code103	.byte	46                              # DW_TAG_subprogram104	.byte	0                               # DW_CHILDREN_no105	.byte	3                               # DW_AT_name106	.byte	14                              # DW_FORM_strp107	.byte	58                              # DW_AT_decl_file108	.byte	11                              # DW_FORM_data1109	.byte	59                              # DW_AT_decl_line110	.byte	11                              # DW_FORM_data1111	.byte	39                              # DW_AT_prototyped112	.byte	25                              # DW_FORM_flag_present113	.byte	63                              # DW_AT_external114	.byte	25                              # DW_FORM_flag_present115	.byte	32                              # DW_AT_inline116	.byte	11                              # DW_FORM_data1117	.byte	0                               # EOM(1)118	.byte	0                               # EOM(2)119	.byte	3                               # Abbreviation Code120	.byte	46                              # DW_TAG_subprogram121	.byte	1                               # DW_CHILDREN_yes122	.byte	17                              # DW_AT_low_pc123	.byte	1                               # DW_FORM_addr124	.byte	18                              # DW_AT_high_pc125	.byte	6                               # DW_FORM_data4126	.byte	64                              # DW_AT_frame_base127	.byte	24                              # DW_FORM_exprloc128	.byte	3                               # DW_AT_name129	.byte	14                              # DW_FORM_strp130	.byte	58                              # DW_AT_decl_file131	.byte	11                              # DW_FORM_data1132	.byte	59                              # DW_AT_decl_line133	.byte	11                              # DW_FORM_data1134	.byte	39                              # DW_AT_prototyped135	.byte	25                              # DW_FORM_flag_present136	.byte	63                              # DW_AT_external137	.byte	25                              # DW_FORM_flag_present138	.byte	0                               # EOM(1)139	.byte	0                               # EOM(2)140	.byte	4                               # Abbreviation Code141	.byte	29                              # DW_TAG_inlined_subroutine142	.byte	0                               # DW_CHILDREN_no143	.byte	49                              # DW_AT_abstract_origin144	.byte	19                              # DW_FORM_ref4145	.byte	17                              # DW_AT_low_pc146	.byte	1                               # DW_FORM_addr147	.byte	18                              # DW_AT_high_pc148	.byte	6                               # DW_FORM_data4149	.byte	88                              # DW_AT_call_file150	.byte	11                              # DW_FORM_data1151	.byte	89                              # DW_AT_call_line152	.byte	11                              # DW_FORM_data1153	.byte	87                              # DW_AT_call_column154	.byte	11                              # DW_FORM_data1155	.byte	0                               # EOM(1)156	.byte	0                               # EOM(2)157	.byte	0                               # EOM(3)158	.section	.debug_info,"",@progbits159.Lcu_begin0:160	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit161.Ldebug_info_start0:162	.short	4                               # DWARF version number163	.long	.debug_abbrev                   # Offset Into Abbrev. Section164	.byte	8                               # Address Size (in bytes)165	.byte	1                               # Abbrev [1] 0xb:0x52 DW_TAG_compile_unit166	.long	.Linfo_string0                  # DW_AT_producer167	.short	12                              # DW_AT_language168	.long	.Linfo_string1                  # DW_AT_name169	.long	.Lline_table_start0             # DW_AT_stmt_list170	.long	.Linfo_string2                  # DW_AT_comp_dir171	.quad	.Lfunc_begin0                   # DW_AT_low_pc172	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc173	.byte	2                               # Abbrev [2] 0x2a:0x8 DW_TAG_subprogram174	.long	.Linfo_string3                  # DW_AT_name175	.byte	1                               # DW_AT_decl_file176	.byte	7                               # DW_AT_decl_line177                                        # DW_AT_prototyped178                                        # DW_AT_external179	.byte	1                               # DW_AT_inline180	.byte	3                               # Abbrev [3] 0x32:0x2a DW_TAG_subprogram181	.quad	.Lfunc_begin0                   # DW_AT_low_pc182	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc183	.byte	1                               # DW_AT_frame_base184	.byte	86185	.long	.Linfo_string4                  # DW_AT_name186	.byte	1                               # DW_AT_decl_file187	.byte	3                               # DW_AT_decl_line188                                        # DW_AT_prototyped189                                        # DW_AT_external190	.byte	4                               # Abbrev [4] 0x47:0x14 DW_TAG_inlined_subroutine191	.long	42                              # DW_AT_abstract_origin192	.quad	.Ltmp0                          # DW_AT_low_pc193	.long	.Ltmp1-.Ltmp0                   # DW_AT_high_pc194	.byte	1                               # DW_AT_call_file195	.byte	4                               # DW_AT_call_line196	.byte	3                               # DW_AT_call_column197	.byte	0                               # End Of Children Mark198	.byte	0                               # End Of Children Mark199.Ldebug_info_end0:200	.section	.debug_str,"MS",@progbits,1201.Linfo_string0:202	.asciz	"Debian clang version 13.0.1-6" # string offset=0203.Linfo_string1:204	.asciz	"tmp.c"                         # string offset=30205.Linfo_string2:206	.asciz	"/tmp" # string offset=36207.Linfo_string3:208	.asciz	"second"                        # string offset=85209.Linfo_string4:210	.asciz	"first"                         # string offset=92211	.ident	"Debian clang version 13.0.1-6"212	.section	".note.GNU-stack","",@progbits213	.addrsig214	.addrsig_sym first215	.section	.debug_line,"",@progbits216.Lline_table_start0:217