brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.9 KiB · 732e0d6 Raw
190 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %s -o %t1.o4# RUN: %clang %cflags -dwarf-5 %t1.o -o %t.exe -Wl,-q5# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections6# RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.exe | FileCheck --check-prefix=PRECHECK %s7# RUN: llvm-dwarfdump --show-form --verbose --debug-line %t.bolt | FileCheck --check-prefix=POSTCHECK %s8 9## This test checks that DWARF5 .debug_line is handled correctly.10 11# PRECHECK: version: 512# PRECHECK: include_directories[  0] =  .debug_line_str13# PRECHECK-SAME: ] = "."14# PRECHECK-NEXT: file_names[  0]:15# PRECHECK-NEXT: name:  .debug_line_str16# PRECHECK-SAME: = "main.cpp"17# PRECHECK-NEXT: dir_index: 018# PRECHECK-NEXT: md5_checksum: bb12fec8d002b1f0e06f7dee4604c6cc19# PRECHECK-NOT: file_names[  1]:20 21# POSTCHECK: version: 522# POSTCHECK: include_directories[  0] =  .debug_line_str23# POSTCHECK-SAME: ] = "."24# POSTCHECK-NEXT: file_names[  0]:25# POSTCHECK-NEXT: name:  .debug_line_str26# POSTCHECK-SAME: ] = "main.cpp"27# POSTCHECK-NEXT: dir_index: 028# POSTCHECK-NEXT: md5_checksum: bb12fec8d002b1f0e06f7dee4604c6cc29# POSTCHECK-NOT: file_names[  1]:30 31# int main() {32#    return 0;33# }34 35	.text36	.file	"main.cpp"37	.globl	main                            # -- Begin function main38	.p2align	4, 0x9039	.type	main,@function40main:                                   # @main41.Lfunc_begin0:42	.file	0 "." "main.cpp" md5 0xbb12fec8d002b1f0e06f7dee4604c6cc43	.loc	0 1 0                           # main.cpp:1:044	.cfi_startproc45# %bb.0:                                # %entry46	pushq	%rbp47	.cfi_def_cfa_offset 1648	.cfi_offset %rbp, -1649	movq	%rsp, %rbp50	.cfi_def_cfa_register %rbp51	movl	$0, -4(%rbp)52.Ltmp0:53	.loc	0 2 3 prologue_end              # main.cpp:2:354	xorl	%eax, %eax55	popq	%rbp56	.cfi_def_cfa %rsp, 857	retq58.Ltmp1:59.Lfunc_end0:60	.size	main, .Lfunc_end0-main61	.cfi_endproc62                                        # -- End function63	.section	.debug_abbrev,"",@progbits64	.byte	1                               # Abbreviation Code65	.byte	17                              # DW_TAG_compile_unit66	.byte	1                               # DW_CHILDREN_yes67	.byte	37                              # DW_AT_producer68	.byte	37                              # DW_FORM_strx169	.byte	19                              # DW_AT_language70	.byte	5                               # DW_FORM_data271	.byte	3                               # DW_AT_name72	.byte	37                              # DW_FORM_strx173	.byte	114                             # DW_AT_str_offsets_base74	.byte	23                              # DW_FORM_sec_offset75	.byte	16                              # DW_AT_stmt_list76	.byte	23                              # DW_FORM_sec_offset77	.byte	27                              # DW_AT_comp_dir78	.byte	37                              # DW_FORM_strx179	.byte	17                              # DW_AT_low_pc80	.byte	27                              # DW_FORM_addrx81	.byte	18                              # DW_AT_high_pc82	.byte	6                               # DW_FORM_data483	.byte	115                             # DW_AT_addr_base84	.byte	23                              # DW_FORM_sec_offset85	.byte	0                               # EOM(1)86	.byte	0                               # EOM(2)87	.byte	2                               # Abbreviation Code88	.byte	46                              # DW_TAG_subprogram89	.byte	0                               # DW_CHILDREN_no90	.byte	17                              # DW_AT_low_pc91	.byte	27                              # DW_FORM_addrx92	.byte	18                              # DW_AT_high_pc93	.byte	6                               # DW_FORM_data494	.byte	64                              # DW_AT_frame_base95	.byte	24                              # DW_FORM_exprloc96	.byte	3                               # DW_AT_name97	.byte	37                              # DW_FORM_strx198	.byte	58                              # DW_AT_decl_file99	.byte	11                              # DW_FORM_data1100	.byte	59                              # DW_AT_decl_line101	.byte	11                              # DW_FORM_data1102	.byte	73                              # DW_AT_type103	.byte	19                              # DW_FORM_ref4104	.byte	63                              # DW_AT_external105	.byte	25                              # DW_FORM_flag_present106	.byte	0                               # EOM(1)107	.byte	0                               # EOM(2)108	.byte	3                               # Abbreviation Code109	.byte	36                              # DW_TAG_base_type110	.byte	0                               # DW_CHILDREN_no111	.byte	3                               # DW_AT_name112	.byte	37                              # DW_FORM_strx1113	.byte	62                              # DW_AT_encoding114	.byte	11                              # DW_FORM_data1115	.byte	11                              # DW_AT_byte_size116	.byte	11                              # DW_FORM_data1117	.byte	0                               # EOM(1)118	.byte	0                               # EOM(2)119	.byte	0                               # EOM(3)120	.section	.debug_info,"",@progbits121.Lcu_begin0:122	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit123.Ldebug_info_start0:124	.short	5                               # DWARF version number125	.byte	1                               # DWARF Unit Type126	.byte	8                               # Address Size (in bytes)127	.long	.debug_abbrev                   # Offset Into Abbrev. Section128	.byte	1                               # Abbrev [1] 0xc:0x2b DW_TAG_compile_unit129	.byte	0                               # DW_AT_producer130	.short	33                              # DW_AT_language131	.byte	1                               # DW_AT_name132	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base133	.long	.Lline_table_start0             # DW_AT_stmt_list134	.byte	2                               # DW_AT_comp_dir135	.byte	0                               # DW_AT_low_pc136	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc137	.long	.Laddr_table_base0              # DW_AT_addr_base138	.byte	2                               # Abbrev [2] 0x23:0xf DW_TAG_subprogram139	.byte	0                               # DW_AT_low_pc140	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc141	.byte	1                               # DW_AT_frame_base142	.byte	86143	.byte	3                               # DW_AT_name144	.byte	0                               # DW_AT_decl_file145	.byte	1                               # DW_AT_decl_line146	.long	50                              # DW_AT_type147                                        # DW_AT_external148	.byte	3                               # Abbrev [3] 0x32:0x4 DW_TAG_base_type149	.byte	4                               # DW_AT_name150	.byte	5                               # DW_AT_encoding151	.byte	4                               # DW_AT_byte_size152	.byte	0                               # End Of Children Mark153.Ldebug_info_end0:154	.section	.debug_str_offsets,"",@progbits155	.long	24                              # Length of String Offsets Set156	.short	5157	.short	0158.Lstr_offsets_base0:159	.section	.debug_str,"MS",@progbits,1160.Linfo_string0:161	.asciz	"clang version 15.0.0" # string offset=0162.Linfo_string1:163	.asciz	"main.cpp"                      # string offset=134164.Linfo_string2:165	.asciz	"." # string offset=143166.Linfo_string3:167	.asciz	"main"                          # string offset=180168.Linfo_string4:169	.asciz	"int"                           # string offset=185170	.section	.debug_str_offsets,"",@progbits171	.long	.Linfo_string0172	.long	.Linfo_string1173	.long	.Linfo_string2174	.long	.Linfo_string3175	.long	.Linfo_string4176	.section	.debug_addr,"",@progbits177	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution178.Ldebug_addr_start0:179	.short	5                               # DWARF version number180	.byte	8                               # Address size181	.byte	0                               # Segment selector size182.Laddr_table_base0:183	.quad	.Lfunc_begin0184.Ldebug_addr_end0:185	.ident	"clang version 15.0.0"186	.section	".note.GNU-stack","",@progbits187	.addrsig188	.section	.debug_line,"",@progbits189.Lline_table_start0:190