315 lines · plain
1# RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o %t2# RUN: llvm-dwarfdump --debug-info=0x0000002a -p %t | FileCheck %s --check-prefix=PARENTS3# RUN: llvm-dwarfdump --debug-info=0x0000002a -c %t | FileCheck %s --check-prefix=CHILDREN4# RUN: llvm-dwarfdump --debug-info=0x0000002a -p -c %t | FileCheck %s --check-prefix=BOTH5# RUN: llvm-dwarfdump --debug-info=0x00000032 -p -parent-recurse-depth 1 -c %t | FileCheck %s --check-prefix=ONEPARENT6 7# PARENTS: DW_TAG_compile_unit8# PARENTS: DW_TAG_enumeration_type9# PARENTS-NOT: DW_TAG_enumerator10 11# ONEPARENT-NOT: DW_TAG_compile_unit12# ONEPARENT: DW_TAG_enumeration_type13# ONEPARENT: DW_TAG_enumerator14 15# CHILDREN-NOT: DW_TAG_compile_unit16# CHILDREN: DW_TAG_enumerator17# CHILDREN: DW_AT_name ("first")18# CHILDREN: DW_TAG_enumerator19# CHILDREN: DW_AT_name ("second")20 21# BOTH: DW_TAG_compile_unit22# BOTH: DW_TAG_enumeration_type23# BOTH: DW_TAG_enumerator24# BOTH: DW_AT_name ("first")25# BOTH: DW_TAG_enumerator26# BOTH: DW_AT_name ("second")27 28# BOTH-NOT: DW_TAG_compile_unit29# BOTH-NOT: DW_TAG_enumeration_type30# BOTH-NOT: DW_TAG_enumerator31 32 .section __TEXT,__text,regular,pure_instructions33 .file 1 "/private/tmp" "/tmp/enum.c"34 .globl _main ## -- Begin function main35 .p2align 4, 0x9036_main: ## @main37Lfunc_begin0:38 .loc 1 4 0 ## /tmp/enum.c:4:039 .cfi_startproc40## %bb.0: ## %entry41 pushq %rbp42 .cfi_def_cfa_offset 1643 .cfi_offset %rbp, -1644 movq %rsp, %rbp45 .cfi_def_cfa_register %rbp46 movl $0, -4(%rbp)47Ltmp0:48 .loc 1 5 7 prologue_end ## /tmp/enum.c:5:749 movl $0, -8(%rbp)50 .loc 1 6 10 ## /tmp/enum.c:6:1051 movl -8(%rbp), %eax52 .loc 1 6 3 is_stmt 0 ## /tmp/enum.c:6:353 popq %rbp54 retq55Ltmp1:56Lfunc_end0:57 .cfi_endproc58 ## -- End function59 .section __DWARF,__debug_str,regular,debug60Linfo_string:61 .asciz "clang version 7.0.0 " ## string offset=062 .asciz "/tmp/enum.c" ## string offset=2163 .asciz "/private/tmp" ## string offset=3364 .asciz "unsigned int" ## string offset=4665 .asciz "first" ## string offset=5966 .asciz "second" ## string offset=6567 .asciz "main" ## string offset=7268 .asciz "int" ## string offset=7769 .asciz "var" ## string offset=8170 .section __DWARF,__debug_abbrev,regular,debug71Lsection_abbrev:72 .byte 1 ## Abbreviation Code73 .byte 17 ## DW_TAG_compile_unit74 .byte 1 ## DW_CHILDREN_yes75 .byte 37 ## DW_AT_producer76 .byte 14 ## DW_FORM_strp77 .byte 19 ## DW_AT_language78 .byte 5 ## DW_FORM_data279 .byte 3 ## DW_AT_name80 .byte 14 ## DW_FORM_strp81 .byte 16 ## DW_AT_stmt_list82 .byte 23 ## DW_FORM_sec_offset83 .byte 27 ## DW_AT_comp_dir84 .byte 14 ## DW_FORM_strp85 .byte 17 ## DW_AT_low_pc86 .byte 1 ## DW_FORM_addr87 .byte 18 ## DW_AT_high_pc88 .byte 6 ## DW_FORM_data489 .byte 0 ## EOM(1)90 .byte 0 ## EOM(2)91 .byte 2 ## Abbreviation Code92 .byte 4 ## DW_TAG_enumeration_type93 .byte 1 ## DW_CHILDREN_yes94 .byte 73 ## DW_AT_type95 .byte 19 ## DW_FORM_ref496 .byte 11 ## DW_AT_byte_size97 .byte 11 ## DW_FORM_data198 .byte 58 ## DW_AT_decl_file99 .byte 11 ## DW_FORM_data1100 .byte 59 ## DW_AT_decl_line101 .byte 11 ## DW_FORM_data1102 .byte 0 ## EOM(1)103 .byte 0 ## EOM(2)104 .byte 3 ## Abbreviation Code105 .byte 40 ## DW_TAG_enumerator106 .byte 0 ## DW_CHILDREN_no107 .byte 3 ## DW_AT_name108 .byte 14 ## DW_FORM_strp109 .byte 28 ## DW_AT_const_value110 .byte 15 ## DW_FORM_udata111 .byte 0 ## EOM(1)112 .byte 0 ## EOM(2)113 .byte 4 ## Abbreviation Code114 .byte 36 ## DW_TAG_base_type115 .byte 0 ## DW_CHILDREN_no116 .byte 3 ## DW_AT_name117 .byte 14 ## DW_FORM_strp118 .byte 62 ## DW_AT_encoding119 .byte 11 ## DW_FORM_data1120 .byte 11 ## DW_AT_byte_size121 .byte 11 ## DW_FORM_data1122 .byte 0 ## EOM(1)123 .byte 0 ## EOM(2)124 .byte 5 ## Abbreviation Code125 .byte 46 ## DW_TAG_subprogram126 .byte 1 ## DW_CHILDREN_yes127 .byte 17 ## DW_AT_low_pc128 .byte 1 ## DW_FORM_addr129 .byte 18 ## DW_AT_high_pc130 .byte 6 ## DW_FORM_data4131 .byte 64 ## DW_AT_frame_base132 .byte 24 ## DW_FORM_exprloc133 .byte 3 ## DW_AT_name134 .byte 14 ## DW_FORM_strp135 .byte 58 ## DW_AT_decl_file136 .byte 11 ## DW_FORM_data1137 .byte 59 ## DW_AT_decl_line138 .byte 11 ## DW_FORM_data1139 .byte 73 ## DW_AT_type140 .byte 19 ## DW_FORM_ref4141 .byte 63 ## DW_AT_external142 .byte 25 ## DW_FORM_flag_present143 .byte 0 ## EOM(1)144 .byte 0 ## EOM(2)145 .byte 6 ## Abbreviation Code146 .byte 52 ## DW_TAG_variable147 .byte 0 ## DW_CHILDREN_no148 .byte 2 ## DW_AT_location149 .byte 24 ## DW_FORM_exprloc150 .byte 3 ## DW_AT_name151 .byte 14 ## DW_FORM_strp152 .byte 58 ## DW_AT_decl_file153 .byte 11 ## DW_FORM_data1154 .byte 59 ## DW_AT_decl_line155 .byte 11 ## DW_FORM_data1156 .byte 73 ## DW_AT_type157 .byte 19 ## DW_FORM_ref4158 .byte 0 ## EOM(1)159 .byte 0 ## EOM(2)160 .byte 0 ## EOM(3)161 .section __DWARF,__debug_info,regular,debug162Lsection_info:163Lcu_begin0:164 .long 114 ## Length of Unit165 .short 4 ## DWARF version number166.set Lset0, Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section167 .long Lset0168 .byte 8 ## Address Size (in bytes)169 .byte 1 ## Abbrev [1] 0xb:0x6b DW_TAG_compile_unit170 .long 0 ## DW_AT_producer171 .short 12 ## DW_AT_language172 .long 21 ## DW_AT_name173.set Lset1, Lline_table_start0-Lsection_line ## DW_AT_stmt_list174 .long Lset1175 .long 33 ## DW_AT_comp_dir176 .quad Lfunc_begin0 ## DW_AT_low_pc177.set Lset2, Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc178 .long Lset2179 .byte 2 ## Abbrev [2] 0x2a:0x15 DW_TAG_enumeration_type180 .long 63 ## DW_AT_type181 .byte 4 ## DW_AT_byte_size182 .byte 1 ## DW_AT_decl_file183 .byte 1 ## DW_AT_decl_line184 .byte 3 ## Abbrev [3] 0x32:0x6 DW_TAG_enumerator185 .long 59 ## DW_AT_name186 .byte 0 ## DW_AT_const_value187 .byte 3 ## Abbrev [3] 0x38:0x6 DW_TAG_enumerator188 .long 65 ## DW_AT_name189 .byte 1 ## DW_AT_const_value190 .byte 0 ## End Of Children Mark191 .byte 4 ## Abbrev [4] 0x3f:0x7 DW_TAG_base_type192 .long 46 ## DW_AT_name193 .byte 7 ## DW_AT_encoding194 .byte 4 ## DW_AT_byte_size195 .byte 5 ## Abbrev [5] 0x46:0x28 DW_TAG_subprogram196 .quad Lfunc_begin0 ## DW_AT_low_pc197.set Lset3, Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc198 .long Lset3199 .byte 1 ## DW_AT_frame_base200 .byte 86201 .long 72 ## DW_AT_name202 .byte 1 ## DW_AT_decl_file203 .byte 3 ## DW_AT_decl_line204 .long 110 ## DW_AT_type205 ## DW_AT_external206 .byte 6 ## Abbrev [6] 0x5f:0xe DW_TAG_variable207 .byte 2 ## DW_AT_location208 .byte 145209 .byte 120210 .long 81 ## DW_AT_name211 .byte 1 ## DW_AT_decl_file212 .byte 5 ## DW_AT_decl_line213 .long 110 ## DW_AT_type214 .byte 0 ## End Of Children Mark215 .byte 4 ## Abbrev [4] 0x6e:0x7 DW_TAG_base_type216 .long 77 ## DW_AT_name217 .byte 5 ## DW_AT_encoding218 .byte 4 ## DW_AT_byte_size219 .byte 0 ## End Of Children Mark220 .section __DWARF,__debug_ranges,regular,debug221Ldebug_range:222 .section __DWARF,__debug_macinfo,regular,debug223Ldebug_macinfo:224 .byte 0 ## End Of Macro List Mark225 .section __DWARF,__apple_names,regular,debug226Lnames_begin:227 .long 1212240712 ## Header Magic228 .short 1 ## Header Version229 .short 0 ## Header Hash Function230 .long 1 ## Header Bucket Count231 .long 1 ## Header Hash Count232 .long 12 ## Header Data Length233 .long 0 ## HeaderData Die Offset Base234 .long 1 ## HeaderData Atom Count235 .short 1 ## DW_ATOM_die_offset236 .short 6 ## DW_FORM_data4237 .long 0 ## Bucket 0238 .long 2090499946 ## Hash in Bucket 0239.set Lset4, LNames0-Lnames_begin ## Offset in Bucket 0240 .long Lset4241LNames0:242 .long 72 ## main243 .long 1 ## Num DIEs244 .long 70245 .long 0246 .section __DWARF,__apple_objc,regular,debug247Lobjc_begin:248 .long 1212240712 ## Header Magic249 .short 1 ## Header Version250 .short 0 ## Header Hash Function251 .long 1 ## Header Bucket Count252 .long 0 ## Header Hash Count253 .long 12 ## Header Data Length254 .long 0 ## HeaderData Die Offset Base255 .long 1 ## HeaderData Atom Count256 .short 1 ## DW_ATOM_die_offset257 .short 6 ## DW_FORM_data4258 .long -1 ## Bucket 0259 .section __DWARF,__apple_namespac,regular,debug260Lnamespac_begin:261 .long 1212240712 ## Header Magic262 .short 1 ## Header Version263 .short 0 ## Header Hash Function264 .long 1 ## Header Bucket Count265 .long 0 ## Header Hash Count266 .long 12 ## Header Data Length267 .long 0 ## HeaderData Die Offset Base268 .long 1 ## HeaderData Atom Count269 .short 1 ## DW_ATOM_die_offset270 .short 6 ## DW_FORM_data4271 .long -1 ## Bucket 0272 .section __DWARF,__apple_types,regular,debug273Ltypes_begin:274 .long 1212240712 ## Header Magic275 .short 1 ## Header Version276 .short 0 ## Header Hash Function277 .long 2 ## Header Bucket Count278 .long 2 ## Header Hash Count279 .long 20 ## Header Data Length280 .long 0 ## HeaderData Die Offset Base281 .long 3 ## HeaderData Atom Count282 .short 1 ## DW_ATOM_die_offset283 .short 6 ## DW_FORM_data4284 .short 3 ## DW_ATOM_die_tag285 .short 5 ## DW_FORM_data2286 .short 4 ## DW_ATOM_type_flags287 .short 11 ## DW_FORM_data1288 .long 0 ## Bucket 0289 .long 1 ## Bucket 1290 .long 193495088 ## Hash in Bucket 0291 .long -1304652851 ## Hash in Bucket 1292.set Lset5, Ltypes1-Ltypes_begin ## Offset in Bucket 0293 .long Lset5294.set Lset6, Ltypes0-Ltypes_begin ## Offset in Bucket 1295 .long Lset6296Ltypes1:297 .long 77 ## int298 .long 1 ## Num DIEs299 .long 110300 .short 36301 .byte 0302 .long 0303Ltypes0:304 .long 46 ## unsigned int305 .long 1 ## Num DIEs306 .long 63307 .short 36308 .byte 0309 .long 0310 311.subsections_via_symbols312 .section __DWARF,__debug_line,regular,debug313Lsection_line:314Lline_table_start0:315