brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.2 KiB · 06bb9d6 Raw
146 lines · plain
1## This test checks how we handle parsing a broken DWARF when 2## a parent of DW_TAG_inlined_subroutine is anything other than DW_TAG_subprogram.3 4# REQUIRES: x86-registered-target5 6# RUN: llvm-mc -filetype=obj -triple=i386-linux-gnu -o %t.o %s7# RUN: llvm-symbolizer "CODE %t.o 0" \8# RUN:   | FileCheck %s --strict-whitespace --match-full-lines --implicit-check-not={{.}}9 10#      CHECK:main11# CHECK-NEXT:/tmp/test{{/|\\}}test.cpp:2:312 13## Generated from:14##15## int main() {16##   return 123;17## }18##19## clang++ --target=i386-linux-gnu test.cpp -g -O2 -std=c++11 -S -o test.s 20 21	.text22	.file	"test.cpp"23	.globl	main                            # -- Begin function main24	.p2align	4, 0x9025	.type	main,@function26main:                                   # @main27.Lfunc_begin0:28	.file	1 "/tmp/test" "test.cpp"29	.loc	1 1 0                           # test.cpp:1:030	.cfi_sections .debug_frame31	.cfi_startproc32# %bb.0:                                # %entry33	.loc	1 2 3 prologue_end              # test.cpp:2:334	movl	$123, %eax35	retl36.Ltmp0:37.Lfunc_end0:38	.size	main, .Lfunc_end0-main39	.cfi_endproc40                                        # -- End function41	.section	.debug_abbrev,"",@progbits42	.byte	1                               # Abbreviation Code43	.byte	17                              # DW_TAG_compile_unit44	.byte	1                               # DW_CHILDREN_yes45	.byte	37                              # DW_AT_producer46	.byte	14                              # DW_FORM_strp47	.byte	19                              # DW_AT_language48	.byte	5                               # DW_FORM_data249	.byte	3                               # DW_AT_name50	.byte	14                              # DW_FORM_strp51	.byte	16                              # DW_AT_stmt_list52	.byte	23                              # DW_FORM_sec_offset53	.byte	27                              # DW_AT_comp_dir54	.byte	14                              # DW_FORM_strp55	.byte	17                              # DW_AT_low_pc56	.byte	1                               # DW_FORM_addr57	.byte	18                              # DW_AT_high_pc58	.byte	6                               # DW_FORM_data459	.byte	0                               # EOM(1)60	.byte	0                               # EOM(2)61	.byte	2                               # Abbreviation Code62// Replace DW_TAG_subprogram with DW_TAG_inlined_subroutine63//	.byte	46                              # DW_TAG_subprogram64	.byte	29                              # DW_TAG_inlined_subroutine65	.byte	0                               # DW_CHILDREN_no66	.byte	17                              # DW_AT_low_pc67	.byte	1                               # DW_FORM_addr68	.byte	18                              # DW_AT_high_pc69	.byte	6                               # DW_FORM_data470	.byte	64                              # DW_AT_frame_base71	.byte	24                              # DW_FORM_exprloc72	.ascii	"\227B"                         # DW_AT_GNU_all_call_sites73	.byte	25                              # DW_FORM_flag_present74	.byte	3                               # DW_AT_name75	.byte	14                              # DW_FORM_strp76	.byte	58                              # DW_AT_decl_file77	.byte	11                              # DW_FORM_data178	.byte	59                              # DW_AT_decl_line79	.byte	11                              # DW_FORM_data180	.byte	73                              # DW_AT_type81	.byte	19                              # DW_FORM_ref482	.byte	63                              # DW_AT_external83	.byte	25                              # DW_FORM_flag_present84	.byte	0                               # EOM(1)85	.byte	0                               # EOM(2)86	.byte	3                               # Abbreviation Code87	.byte	36                              # DW_TAG_base_type88	.byte	0                               # DW_CHILDREN_no89	.byte	3                               # DW_AT_name90	.byte	14                              # DW_FORM_strp91	.byte	62                              # DW_AT_encoding92	.byte	11                              # DW_FORM_data193	.byte	11                              # DW_AT_byte_size94	.byte	11                              # DW_FORM_data195	.byte	0                               # EOM(1)96	.byte	0                               # EOM(2)97	.byte	0                               # EOM(3)98	.section	.debug_info,"",@progbits99.Lcu_begin0:100	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit101.Ldebug_info_start0:102	.short	4                               # DWARF version number103	.long	.debug_abbrev                   # Offset Into Abbrev. Section104	.byte	4                               # Address Size (in bytes)105	.byte	1                               # Abbrev [1] 0xb:0x38 DW_TAG_compile_unit106	.long	.Linfo_string0                  # DW_AT_producer107	.short	26                              # DW_AT_language108	.long	.Linfo_string1                  # DW_AT_name109	.long	.Lline_table_start0             # DW_AT_stmt_list110	.long	.Linfo_string2                  # DW_AT_comp_dir111	.long	.Lfunc_begin0                   # DW_AT_low_pc112	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc113	.byte	2                               # Abbrev [2] 0x26:0x15 DW_TAG_subprogram114	.long	.Lfunc_begin0                   # DW_AT_low_pc115	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc116	.byte	1                               # DW_AT_frame_base117	.byte	84118                                        # DW_AT_GNU_all_call_sites119	.long	.Linfo_string3                  # DW_AT_name120	.byte	1                               # DW_AT_decl_file121	.byte	1                               # DW_AT_decl_line122	.long	59                              # DW_AT_type123                                        # DW_AT_external124	.byte	3                               # Abbrev [3] 0x3b:0x7 DW_TAG_base_type125	.long	.Linfo_string4                  # DW_AT_name126	.byte	5                               # DW_AT_encoding127	.byte	4                               # DW_AT_byte_size128	.byte	0                               # End Of Children Mark129.Ldebug_info_end0:130	.section	.debug_str,"MS",@progbits,1131.Linfo_string0:132	.asciz	"clang version 13.0.0"133.Linfo_string1:134	.asciz	"test.cpp"135.Linfo_string2:136	.asciz	"/tmp/test"  # string offset=114137.Linfo_string3:138	.asciz	"main"139.Linfo_string4:140	.asciz	"int"141	.ident	"clang version 13.0.0"142	.section	".note.GNU-stack","",@progbits143	.addrsig144	.section	.debug_line,"",@progbits145.Lline_table_start0:146