357 lines · yaml
1# RUN: yaml2obj %s -o %t.o2# RUN: llvm-dwarfdump -arch arm64 --debug-line --verify %t.o 2>&1 | FileCheck %s3# REQUIRES: system-darwin4 5# CHECK-NOT: error: .debug_line[0x{{[0-9a-f]+}}][0] has invalid file index 1 (valid values are [1,0]):6--- !mach-o7FileHeader:8 magic: 0xFEEDFACF9 cputype: 0x100000C10 cpusubtype: 0x011 filetype: 0x112 ncmds: 413 sizeofcmds: 100014 flags: 0x200015 reserved: 0x016LoadCommands:17 - cmd: LC_SEGMENT_6418 cmdsize: 87219 segname: ''20 vmaddr: 021 vmsize: 63522 fileoff: 103223 filesize: 63524 maxprot: 725 initprot: 726 nsects: 1027 flags: 028 Sections:29 - sectname: __text30 segname: __TEXT31 addr: 0x032 size: 433 offset: 0x40834 align: 235 reloff: 0x036 nreloc: 037 flags: 0x8000040038 reserved1: 0x039 reserved2: 0x040 reserved3: 0x041 content: C0035FD642 - sectname: __debug_abbrev43 segname: __DWARF44 addr: 0x445 size: 5046 offset: 0x40C47 align: 048 reloff: 0x049 nreloc: 050 flags: 0x200000051 reserved1: 0x052 reserved2: 0x053 reserved3: 0x054 - sectname: __debug_info55 segname: __DWARF56 addr: 0x3657 size: 7658 offset: 0x43E59 align: 060 reloff: 0x68861 nreloc: 262 flags: 0x200000063 reserved1: 0x064 reserved2: 0x065 reserved3: 0x066 relocations:67 - address: 0x3368 symbolnum: 169 pcrel: false70 length: 371 extern: false72 type: 073 scattered: false74 value: 075 - address: 0x2676 symbolnum: 177 pcrel: false78 length: 379 extern: false80 type: 081 scattered: false82 value: 083 - sectname: __debug_str84 segname: __DWARF85 addr: 0x8286 size: 19687 offset: 0x48A88 align: 089 reloff: 0x090 nreloc: 091 flags: 0x200000092 reserved1: 0x093 reserved2: 0x094 reserved3: 0x095 - sectname: __apple_names96 segname: __DWARF97 addr: 0x14698 size: 8899 offset: 0x54E100 align: 0101 reloff: 0x0102 nreloc: 0103 flags: 0x2000000104 reserved1: 0x0105 reserved2: 0x0106 reserved3: 0x0107 content: 485341480100000002000000020000000C000000000000000100000001000600FFFFFFFF000000008973880BEB28616A3800000048000000B8000000010000003200000000000000BC000000010000003200000000000000108 - sectname: __apple_objc109 segname: __DWARF110 addr: 0x19E111 size: 36112 offset: 0x5A6113 align: 0114 reloff: 0x0115 nreloc: 0116 flags: 0x2000000117 reserved1: 0x0118 reserved2: 0x0119 reserved3: 0x0120 content: 485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF121 - sectname: __apple_namespac122 segname: __DWARF123 addr: 0x1C2124 size: 36125 offset: 0x5CA126 align: 0127 reloff: 0x0128 nreloc: 0129 flags: 0x2000000130 reserved1: 0x0131 reserved2: 0x0132 reserved3: 0x0133 content: 485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF134 - sectname: __apple_types135 segname: __DWARF136 addr: 0x1E6137 size: 44138 offset: 0x5EE139 align: 0140 reloff: 0x0141 nreloc: 0142 flags: 0x2000000143 reserved1: 0x0144 reserved2: 0x0145 reserved3: 0x0146 content: 48534148010000000100000000000000140000000000000003000000010006000300050004000B00FFFFFFFF147 - sectname: __compact_unwind148 segname: __LD149 addr: 0x218150 size: 32151 offset: 0x620152 align: 3153 reloff: 0x698154 nreloc: 1155 flags: 0x2000000156 reserved1: 0x0157 reserved2: 0x0158 reserved3: 0x0159 content: '0000000000000000040000000000000200000000000000000000000000000000'160 relocations:161 - address: 0x0162 symbolnum: 1163 pcrel: false164 length: 3165 extern: false166 type: 0167 scattered: false168 value: 0169 - sectname: __debug_line170 segname: __DWARF171 addr: 0x238172 size: 67173 offset: 0x640174 align: 0175 reloff: 0x6A0176 nreloc: 1177 flags: 0x2000000178 reserved1: 0x0179 reserved2: 0x0180 reserved3: 0x0181 relocations:182 - address: 0x35183 symbolnum: 1184 pcrel: false185 length: 3186 extern: false187 type: 0188 scattered: false189 value: 0190 - cmd: LC_BUILD_VERSION191 cmdsize: 24192 platform: 1193 minos: 917504194 sdk: 918528195 ntools: 0196 - cmd: LC_SYMTAB197 cmdsize: 24198 symoff: 1704199 nsyms: 3200 stroff: 1752201 strsize: 24202 - cmd: LC_DYSYMTAB203 cmdsize: 80204 ilocalsym: 0205 nlocalsym: 2206 iextdefsym: 2207 nextdefsym: 1208 iundefsym: 3209 nundefsym: 0210 tocoff: 0211 ntoc: 0212 modtaboff: 0213 nmodtab: 0214 extrefsymoff: 0215 nextrefsyms: 0216 indirectsymoff: 0217 nindirectsyms: 0218 extreloff: 0219 nextrel: 0220 locreloff: 0221 nlocrel: 0222LinkEditData:223 NameList:224 - n_strx: 16225 n_type: 0xE226 n_sect: 1227 n_desc: 0228 n_value: 0229 - n_strx: 10230 n_type: 0xE231 n_sect: 9232 n_desc: 0233 n_value: 536234 - n_strx: 1235 n_type: 0xF236 n_sect: 1237 n_desc: 0238 n_value: 0239 StringTable:240 - ''241 - __Z3foov242 - ltmp1243 - ltmp0244 - ''245 - ''246DWARF:247 debug_str:248 - 'Apple clang version 16.0.0 (clang-1600.0.9.14)'249 - '/tmp/test.cpp'250 - '/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk'251 - MacOSX14.4.sdk252 - '/Users/shubham/Development/llvm-project/build_ninja'253 - foo254 - _Z3foov255 debug_abbrev:256 - ID: 0257 Table:258 - Code: 0x1259 Tag: DW_TAG_compile_unit260 Children: DW_CHILDREN_yes261 Attributes:262 - Attribute: DW_AT_producer263 Form: DW_FORM_strp264 - Attribute: DW_AT_language265 Form: DW_FORM_data2266 - Attribute: DW_AT_name267 Form: DW_FORM_strp268 - Attribute: DW_AT_LLVM_sysroot269 Form: DW_FORM_strp270 - Attribute: DW_AT_APPLE_sdk271 Form: DW_FORM_strp272 - Attribute: DW_AT_stmt_list273 Form: DW_FORM_sec_offset274 - Attribute: DW_AT_comp_dir275 Form: DW_FORM_strp276 - Attribute: DW_AT_low_pc277 Form: DW_FORM_addr278 - Attribute: DW_AT_high_pc279 Form: DW_FORM_data4280 - Code: 0x2281 Tag: DW_TAG_subprogram282 Children: DW_CHILDREN_no283 Attributes:284 - Attribute: DW_AT_low_pc285 Form: DW_FORM_addr286 - Attribute: DW_AT_high_pc287 Form: DW_FORM_data4288 - Attribute: DW_AT_APPLE_omit_frame_ptr289 Form: DW_FORM_flag_present290 - Attribute: DW_AT_frame_base291 Form: DW_FORM_exprloc292 - Attribute: DW_AT_linkage_name293 Form: DW_FORM_strp294 - Attribute: DW_AT_name295 Form: DW_FORM_strp296 - Attribute: DW_AT_decl_file297 Form: DW_FORM_data1298 - Attribute: DW_AT_decl_line299 Form: DW_FORM_data1300 - Attribute: DW_AT_external301 Form: DW_FORM_flag_present302 debug_info:303 - Length: 0x48304 Version: 4305 AbbrevTableID: 0306 AbbrOffset: 0x0307 AddrSize: 8308 Entries:309 - AbbrCode: 0x1310 Values:311 - Value: 0x0312 - Value: 0x4313 - Value: 0x2F314 - Value: 0x3D315 - Value: 0x75316 - Value: 0x0317 - Value: 0x84318 - Value: 0x0319 - Value: 0x4320 - AbbrCode: 0x2321 Values:322 - Value: 0x0323 - Value: 0x4324 - Value: 0x1325 - Value: 0x1326 BlockData: [ 0x6F ]327 - Value: 0xBC328 - Value: 0xB8329 - Value: 0x1330 - Value: 0x1331 - Value: 0x1332 - AbbrCode: 0x0333 debug_line:334 - Length: 38335 Version: 4336 PrologueLength: 29337 MinInstLength: 1338 MaxOpsPerInst: 1339 DefaultIsStmt: 1340 LineBase: 251341 LineRange: 14342 OpcodeBase: 13343 StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]344 IncludeDirs:345 - '/tmp'346 Files:347 - Name: ''348 DirIdx: 10349 ModTime: 11350 Length: 12351 Opcodes:352 - Opcode: DW_LNS_extended_op353 ExtLen: 1354 SubOpcode: DW_LNE_end_sequence355 Data: 0356...357