317 lines · plain
1# RUN: llvm-mc %s -filetype obj -triple arm64-apple-darwin -o %t2# RUN: llvm-dwarfdump --debug-info %t | FileCheck %s3# RUN: llvm-dwarfdump --verify %t4 5# CHECK: 0x0000001e: DW_TAG_variable6# CHECK: DW_AT_name ("p1")7# CHECK: DW_AT_type (0x00000033 "void *__ptrauth(4, 1, 0x04d2)")8 9# CHECK: 0x00000033: DW_TAG_LLVM_ptrauth_type10# CHECK: DW_AT_LLVM_ptrauth_key (0x04)11# CHECK: DW_AT_LLVM_ptrauth_address_discriminated (true)12# CHECK: DW_AT_LLVM_ptrauth_extra_discriminator (0x04d2)13 14# CHECK: 0x0000003c: DW_TAG_variable15# CHECK: DW_AT_name ("p2")16# CHECK: DW_AT_type (0x00000047 "void *__ptrauth(4, 1, 0x04d3, "isa-pointer")")17 18# CHECK: 0x00000047: DW_TAG_LLVM_ptrauth_type19# CHECK: DW_AT_LLVM_ptrauth_key (0x04)20# CHECK: DW_AT_LLVM_ptrauth_address_discriminated (true)21# CHECK: DW_AT_LLVM_ptrauth_extra_discriminator (0x04d3)22# CHECK: DW_AT_LLVM_ptrauth_isa_pointer (true)23 24# CHECK: 0x0000004f: DW_TAG_variable25# CHECK: DW_AT_name ("p3")26# CHECK: DW_AT_type (0x0000005a "void *__ptrauth(4, 1, 0x04d4, "authenticates-null-values,strip")")27 28# CHECK: 0x0000005a: DW_TAG_LLVM_ptrauth_type29# CHECK: DW_AT_LLVM_ptrauth_key (0x04)30# CHECK: DW_AT_LLVM_ptrauth_address_discriminated (true)31# CHECK: DW_AT_LLVM_ptrauth_extra_discriminator (0x04d4)32# CHECK: DW_AT_LLVM_ptrauth_authenticates_null_values (true)33 34# CHECK: 0x00000063: DW_TAG_variable35# CHECK: DW_AT_name ("p4")36# CHECK: DW_AT_type (0x0000006e "void *__ptrauth(4, 1, 0x04d5, "isa-pointer,authenticates-null-values,sign-and-strip")")37 38# CHECK: 0x0000006e: DW_TAG_LLVM_ptrauth_type39# CHECK: DW_AT_LLVM_ptrauth_key (0x04)40# CHECK: DW_AT_LLVM_ptrauth_address_discriminated (true)41# CHECK: DW_AT_LLVM_ptrauth_extra_discriminator (0x04d5)42# CHECK: DW_AT_LLVM_ptrauth_isa_pointer (true)43# CHECK: DW_AT_LLVM_ptrauth_authenticates_null_values (true)44 45 .section __TEXT,__text,regular,pure_instructions46 .file 1 "/" "/tmp/p.c"47 .comm _p,8,3 ; @p48 .section __DWARF,__debug_abbrev,regular,debug49Lsection_abbrev:50 .byte 1 ; Abbreviation Code51 .byte 17 ; DW_TAG_compile_unit52 .byte 1 ; DW_CHILDREN_yes53 .byte 37 ; DW_AT_producer54 .byte 14 ; DW_FORM_strp55 .byte 19 ; DW_AT_language56 .byte 5 ; DW_FORM_data257 .byte 3 ; DW_AT_name58 .byte 14 ; DW_FORM_strp59 .byte 16 ; DW_AT_stmt_list60 .byte 23 ; DW_FORM_sec_offset61 .byte 27 ; DW_AT_comp_dir62 .byte 14 ; DW_FORM_strp63 .byte 0 ; EOM(1)64 .byte 0 ; EOM(2)65 .byte 2 ; Abbreviation Code66 .byte 52 ; DW_TAG_variable67 .byte 0 ; DW_CHILDREN_no68 .byte 3 ; DW_AT_name69 .byte 14 ; DW_FORM_strp70 .byte 73 ; DW_AT_type71 .byte 19 ; DW_FORM_ref472 .byte 63 ; DW_AT_external73 .byte 25 ; DW_FORM_flag_present74 .byte 58 ; DW_AT_decl_file75 .byte 11 ; DW_FORM_data176 .byte 59 ; DW_AT_decl_line77 .byte 11 ; DW_FORM_data178 .byte 2 ; DW_AT_location79 .byte 24 ; DW_FORM_exprloc80 .byte 0 ; EOM(1)81 .byte 0 ; EOM(2)82 .byte 3 ; Abbreviation Code83 .ascii "\200\206\001" ; DW_TAG_LLVM_ptrauth_type84 .byte 0 ; DW_CHILDREN_no85 .byte 73 ; DW_AT_type86 .byte 19 ; DW_FORM_ref487 .ascii "\204|" ; DW_AT_LLVM_ptrauth_key88 .byte 11 ; DW_FORM_data189 .ascii "\205|" ; DW_AT_LLVM_ptrauth_address_discriminated90 .byte 25 ; DW_FORM_flag_present91 .ascii "\206|" ; DW_AT_LLVM_ptrauth_extra_discriminator92 .byte 5 ; DW_FORM_data293 .byte 0 ; EOM(1)94 .byte 0 ; EOM(2)95 .byte 4 ; Abbreviation Code96 .byte 15 ; DW_TAG_pointer_type97 .byte 0 ; DW_CHILDREN_no98 .byte 0 ; EOM(1)99 .byte 0 ; EOM(2)100 .byte 5 ; Abbreviation Code101 .byte 52 ; DW_TAG_variable102 .byte 0 ; DW_CHILDREN_no103 .byte 3 ; DW_AT_name104 .byte 14 ; DW_FORM_strp105 .byte 73 ; DW_AT_type106 .byte 19 ; DW_FORM_ref4107 .byte 63 ; DW_AT_external108 .byte 25 ; DW_FORM_flag_present109 .byte 58 ; DW_AT_decl_file110 .byte 11 ; DW_FORM_data1111 .byte 59 ; DW_AT_decl_line112 .byte 11 ; DW_FORM_data1113 .byte 0 ; EOM(1)114 .byte 0 ; EOM(2)115 .byte 6 ; Abbreviation Code116 .ascii "\200\206\001" ; DW_TAG_LLVM_ptrauth_type117 .byte 0 ; DW_CHILDREN_no118 .byte 73 ; DW_AT_type119 .byte 19 ; DW_FORM_ref4120 .ascii "\204|" ; DW_AT_LLVM_ptrauth_key121 .byte 11 ; DW_FORM_data1122 .ascii "\205|" ; DW_AT_LLVM_ptrauth_address_discriminated123 .byte 25 ; DW_FORM_flag_present124 .ascii "\206|" ; DW_AT_LLVM_ptrauth_extra_discriminator125 .byte 5 ; DW_FORM_data2126 .ascii "\210|" ; DW_AT_LLVM_ptrauth_isa_pointer127 .byte 25 ; DW_FORM_flag_present128 .byte 0 ; EOM(1)129 .byte 0 ; EOM(2)130 .byte 7 ; Abbreviation Code131 .ascii "\200\206\001" ; DW_TAG_LLVM_ptrauth_type132 .byte 0 ; DW_CHILDREN_no133 .byte 73 ; DW_AT_type134 .byte 19 ; DW_FORM_ref4135 .ascii "\204|" ; DW_AT_LLVM_ptrauth_key136 .byte 11 ; DW_FORM_data1137 .ascii "\205|" ; DW_AT_LLVM_ptrauth_address_discriminated138 .byte 25 ; DW_FORM_flag_present139 .ascii "\206|" ; DW_AT_LLVM_ptrauth_extra_discriminator140 .byte 5 ; DW_FORM_data2141 .ascii "\211|" ; DW_AT_LLVM_ptrauth_authenticates_null_values142 .byte 25 ; DW_FORM_flag_present143 .ascii "\212|" ; DW_AT_LLVM_ptrauth_authentication_mode144 .byte 11 ; DW_FORM_data1145 .byte 0 ; EOM(1)146 .byte 0 ; EOM(2)147 .byte 8 ; Abbreviation Code148 .ascii "\200\206\001" ; DW_TAG_LLVM_ptrauth_type149 .byte 0 ; DW_CHILDREN_no150 .byte 73 ; DW_AT_type151 .byte 19 ; DW_FORM_ref4152 .ascii "\204|" ; DW_AT_LLVM_ptrauth_key153 .byte 11 ; DW_FORM_data1154 .ascii "\205|" ; DW_AT_LLVM_ptrauth_address_discriminated155 .byte 25 ; DW_FORM_flag_present156 .ascii "\206|" ; DW_AT_LLVM_ptrauth_extra_discriminator157 .byte 5 ; DW_FORM_data2158 .ascii "\210|" ; DW_AT_LLVM_ptrauth_isa_pointer159 .byte 25 ; DW_FORM_flag_present160 .ascii "\211|" ; DW_AT_LLVM_ptrauth_authenticates_null_values161 .byte 25 ; DW_FORM_flag_present162 .ascii "\212|" ; DW_AT_LLVM_ptrauth_authentication_mode163 .byte 11 ; DW_FORM_data1164 .byte 0 ; EOM(1)165 .byte 0 ; EOM(2)166 .byte 0 ; EOM(3)167 .section __DWARF,__debug_info,regular,debug168Lsection_info:169Lcu_begin0:170.set Lset0, Ldebug_info_end0-Ldebug_info_start0 ; Length of Unit171 .long Lset0172Ldebug_info_start0:173 .short 4 ; DWARF version number174.set Lset1, Lsection_abbrev-Lsection_abbrev ; Offset Into Abbrev. Section175 .long Lset1176 .byte 8 ; Address Size (in bytes)177 .byte 1 ; Abbrev [1] 0xb:0x6d DW_TAG_compile_unit178 .long 0 ; DW_AT_producer179 .short 12 ; DW_AT_language180 .long 1 ; DW_AT_name181.set Lset2, Lline_table_start0-Lsection_line ; DW_AT_stmt_list182 .long Lset2183 .long 10 ; DW_AT_comp_dir184 .byte 2 ; Abbrev [2] 0x1e:0x15 DW_TAG_variable185 .long 12 ; DW_AT_name186 .long 51 ; DW_AT_type187 ; DW_AT_external188 .byte 1 ; DW_AT_decl_file189 .byte 1 ; DW_AT_decl_line190 .byte 9 ; DW_AT_location191 .byte 3192 .quad _p193 .byte 3 ; Abbrev [3] 0x33:0x8 DW_TAG_LLVM_ptrauth_type194 .long 59 ; DW_AT_type195 .byte 4 ; DW_AT_LLVM_ptrauth_key196 ; DW_AT_LLVM_ptrauth_address_discriminated197 .short 1234 ; DW_AT_LLVM_ptrauth_extra_discriminator198 .byte 4 ; Abbrev [4] 0x3b:0x1 DW_TAG_pointer_type199 .byte 5 ; Abbrev [5] 0x3c:0xb DW_TAG_variable200 .long 15 ; DW_AT_name201 .long 71 ; DW_AT_type202 ; DW_AT_external203 .byte 1 ; DW_AT_decl_file204 .byte 1 ; DW_AT_decl_line205 .byte 6 ; Abbrev [6] 0x47:0x8 DW_TAG_LLVM_ptrauth_type206 .long 59 ; DW_AT_type207 .byte 4 ; DW_AT_LLVM_ptrauth_key208 ; DW_AT_LLVM_ptrauth_address_discriminated209 .short 1235 ; DW_AT_LLVM_ptrauth_extra_discriminator210 ; DW_AT_LLVM_ptrauth_isa_pointer211 .byte 5 ; Abbrev [5] 0x4f:0xb DW_TAG_variable212 .long 18 ; DW_AT_name213 .long 90 ; DW_AT_type214 ; DW_AT_external215 .byte 1 ; DW_AT_decl_file216 .byte 1 ; DW_AT_decl_line217 .byte 7 ; Abbrev [7] 0x5a:0x9 DW_TAG_LLVM_ptrauth_type218 .long 59 ; DW_AT_type219 .byte 4 ; DW_AT_LLVM_ptrauth_key220 ; DW_AT_LLVM_ptrauth_address_discriminated221 .short 1236 ; DW_AT_LLVM_ptrauth_extra_discriminator222 ; DW_AT_LLVM_ptrauth_authenticates_null_values223 .byte 1 ; DW_AT_LLVM_ptrauth_authentication_mode224 .byte 5 ; Abbrev [5] 0x63:0xb DW_TAG_variable225 .long 21 ; DW_AT_name226 .long 110 ; DW_AT_type227 ; DW_AT_external228 .byte 1 ; DW_AT_decl_file229 .byte 1 ; DW_AT_decl_line230 .byte 8 ; Abbrev [8] 0x6e:0x9 DW_TAG_LLVM_ptrauth_type231 .long 59 ; DW_AT_type232 .byte 4 ; DW_AT_LLVM_ptrauth_key233 ; DW_AT_LLVM_ptrauth_address_discriminated234 .short 1237 ; DW_AT_LLVM_ptrauth_extra_discriminator235 ; DW_AT_LLVM_ptrauth_isa_pointer236 ; DW_AT_LLVM_ptrauth_authenticates_null_values237 .byte 2 ; DW_AT_LLVM_ptrauth_authentication_mode238 .byte 0 ; End Of Children Mark239Ldebug_info_end0:240 .section __DWARF,__debug_str,regular,debug241Linfo_string:242 .byte 0 ; string offset=0243 .asciz "/tmp/p.c" ; string offset=1244 .asciz "/" ; string offset=10245 .asciz "p1" ; string offset=12246 .asciz "p2" ; string offset=15247 .asciz "p3" ; string offset=18248 .asciz "p4" ; string offset=21249 .section __DWARF,__apple_names,regular,debug250Lnames_begin:251 .long 1212240712 ; Header Magic252 .short 1 ; Header Version253 .short 0 ; Header Hash Function254 .long 1 ; Header Bucket Count255 .long 1 ; Header Hash Count256 .long 12 ; Header Data Length257 .long 0 ; HeaderData Die Offset Base258 .long 1 ; HeaderData Atom Count259 .short 1 ; DW_ATOM_die_offset260 .short 6 ; DW_FORM_data4261 .long 0 ; Bucket 0262 .long 5863654 ; Hash in Bucket 0263.set Lset3, LNames0-Lnames_begin ; Offset in Bucket 0264 .long Lset3265LNames0:266 .long 12 ; p1267 .long 1 ; Num DIEs268 .long 30269 .long 0270 .section __DWARF,__apple_objc,regular,debug271Lobjc_begin:272 .long 1212240712 ; Header Magic273 .short 1 ; Header Version274 .short 0 ; Header Hash Function275 .long 1 ; Header Bucket Count276 .long 0 ; Header Hash Count277 .long 12 ; Header Data Length278 .long 0 ; HeaderData Die Offset Base279 .long 1 ; HeaderData Atom Count280 .short 1 ; DW_ATOM_die_offset281 .short 6 ; DW_FORM_data4282 .long -1 ; Bucket 0283 .section __DWARF,__apple_namespac,regular,debug284Lnamespac_begin:285 .long 1212240712 ; Header Magic286 .short 1 ; Header Version287 .short 0 ; Header Hash Function288 .long 1 ; Header Bucket Count289 .long 0 ; Header Hash Count290 .long 12 ; Header Data Length291 .long 0 ; HeaderData Die Offset Base292 .long 1 ; HeaderData Atom Count293 .short 1 ; DW_ATOM_die_offset294 .short 6 ; DW_FORM_data4295 .long -1 ; Bucket 0296 .section __DWARF,__apple_types,regular,debug297Ltypes_begin:298 .long 1212240712 ; Header Magic299 .short 1 ; Header Version300 .short 0 ; Header Hash Function301 .long 1 ; Header Bucket Count302 .long 0 ; Header Hash Count303 .long 20 ; Header Data Length304 .long 0 ; HeaderData Die Offset Base305 .long 3 ; HeaderData Atom Count306 .short 1 ; DW_ATOM_die_offset307 .short 6 ; DW_FORM_data4308 .short 3 ; DW_ATOM_die_tag309 .short 5 ; DW_FORM_data2310 .short 4 ; DW_ATOM_type_flags311 .short 11 ; DW_FORM_data1312 .long -1 ; Bucket 0313.subsections_via_symbols314 .section __DWARF,__debug_line,regular,debug315Lsection_line:316Lline_table_start0:317