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.
4 # REQUIRES: x86-registered-target
6 # RUN: llvm-mc -filetype=obj -triple=i386-linux-gnu -o %t.o %s
7 # RUN: llvm-symbolizer "CODE %t.o 0" \
8 # RUN: | FileCheck %s --strict-whitespace --match-full-lines --implicit-check-not={{.}}
11 # CHECK-NEXT:/tmp/test{{/|\\}}test.cpp:2:3
19 ## clang++ --target=i386-linux-gnu test.cpp -g -O2 -std=c++11 -S -o test.s
23 .globl main # -- Begin function main
28 .file 1 "/tmp/test" "test.cpp"
29 .loc 1 1 0 # test.cpp:1:0
30 .cfi_sections .debug_frame
33 .loc 1 2 3 prologue_end # test.cpp:2:3
38 .size main, .Lfunc_end0-main
41 .section .debug_abbrev,"",@progbits
42 .byte 1 # Abbreviation Code
43 .byte 17 # DW_TAG_compile_unit
44 .byte 1 # DW_CHILDREN_yes
45 .byte 37 # DW_AT_producer
46 .byte 14 # DW_FORM_strp
47 .byte 19 # DW_AT_language
48 .byte 5 # DW_FORM_data2
50 .byte 14 # DW_FORM_strp
51 .byte 16 # DW_AT_stmt_list
52 .byte 23 # DW_FORM_sec_offset
53 .byte 27 # DW_AT_comp_dir
54 .byte 14 # DW_FORM_strp
55 .byte 17 # DW_AT_low_pc
56 .byte 1 # DW_FORM_addr
57 .byte 18 # DW_AT_high_pc
58 .byte 6 # DW_FORM_data4
61 .byte 2 # Abbreviation Code
62 // Replace DW_TAG_subprogram with DW_TAG_inlined_subroutine
63 // .byte 46 # DW_TAG_subprogram
64 .byte 29 # DW_TAG_inlined_subroutine
65 .byte 0 # DW_CHILDREN_no
66 .byte 17 # DW_AT_low_pc
67 .byte 1 # DW_FORM_addr
68 .byte 18 # DW_AT_high_pc
69 .byte 6 # DW_FORM_data4
70 .byte 64 # DW_AT_frame_base
71 .byte 24 # DW_FORM_exprloc
72 .ascii "\227B" # DW_AT_GNU_all_call_sites
73 .byte 25 # DW_FORM_flag_present
75 .byte 14 # DW_FORM_strp
76 .byte 58 # DW_AT_decl_file
77 .byte 11 # DW_FORM_data1
78 .byte 59 # DW_AT_decl_line
79 .byte 11 # DW_FORM_data1
81 .byte 19 # DW_FORM_ref4
82 .byte 63 # DW_AT_external
83 .byte 25 # DW_FORM_flag_present
86 .byte 3 # Abbreviation Code
87 .byte 36 # DW_TAG_base_type
88 .byte 0 # DW_CHILDREN_no
90 .byte 14 # DW_FORM_strp
91 .byte 62 # DW_AT_encoding
92 .byte 11 # DW_FORM_data1
93 .byte 11 # DW_AT_byte_size
94 .byte 11 # DW_FORM_data1
98 .section .debug_info,"",@progbits
100 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
102 .short 4 # DWARF version number
103 .long .debug_abbrev # Offset Into Abbrev. Section
104 .byte 4 # Address Size (in bytes)
105 .byte 1 # Abbrev [1] 0xb:0x38 DW_TAG_compile_unit
106 .long .Linfo_string0 # DW_AT_producer
107 .short 26 # DW_AT_language
108 .long .Linfo_string1 # DW_AT_name
109 .long .Lline_table_start0 # DW_AT_stmt_list
110 .long .Linfo_string2 # DW_AT_comp_dir
111 .long .Lfunc_begin0 # DW_AT_low_pc
112 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
113 .byte 2 # Abbrev [2] 0x26:0x15 DW_TAG_subprogram
114 .long .Lfunc_begin0 # DW_AT_low_pc
115 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
116 .byte 1 # DW_AT_frame_base
118 # DW_AT_GNU_all_call_sites
119 .long .Linfo_string3 # DW_AT_name
120 .byte 1 # DW_AT_decl_file
121 .byte 1 # DW_AT_decl_line
122 .long 59 # DW_AT_type
124 .byte 3 # Abbrev [3] 0x3b:0x7 DW_TAG_base_type
125 .long .Linfo_string4 # DW_AT_name
126 .byte 5 # DW_AT_encoding
127 .byte 4 # DW_AT_byte_size
128 .byte 0 # End Of Children Mark
130 .section .debug_str,"MS",@progbits,1
132 .asciz "clang version 13.0.0"
136 .asciz "/tmp/test" # string offset=114
141 .ident "clang version 13.0.0"
142 .section ".note.GNU-stack","",@progbits
144 .section .debug_line,"",@progbits