brintos

brintos / llvm-project-archived public Read only

0
0
Text · 26.6 KiB · 6bf359c Raw
762 lines · yaml
1# RUN: yaml2obj %s -o %t.dSYM2 3## Verify that we don't keep merged functions by default4# RUN: llvm-gsymutil --num-threads=1 --convert %t.dSYM --out-file=%t.default.gSYM5# RUN: llvm-gsymutil --verify --verbose %t.default.gSYM | FileCheck --check-prefix=CHECK-GSYM-DEFAULT %s6 7## Verify that we keep merged functions when specyfing --merged-functions8# RUN: llvm-gsymutil --num-threads=1 --convert %t.dSYM --out-file=%t.keep.gSYM --merged-functions9# RUN: llvm-gsymutil --verify --verbose %t.keep.gSYM | FileCheck --check-prefix=CHECK-GSYM-KEEP %s10 11## Note: For identical functions, the dSYM / gSYM cannot be counted on to be deterministic.12## So we can only match the general structure, not exact function names / offsets13 14 15# CHECK-GSYM-DEFAULT-NOT: Merged FunctionInfos16# CHECK-GSYM-DEFAULT:      FunctionInfo @ 0x{{[0-9a-fA-F]+}}: [0x{{[0-9a-fA-F]+}} - 0x{{[0-9a-fA-F]+}}) "my_func_03"17 18 19# CHECK-GSYM-KEEP:      Address Table:20# CHECK-GSYM-KEEP-NEXT: INDEX  OFFSET16 (ADDRESS)21# CHECK-GSYM-KEEP-NEXT: ====== ===============================22# CHECK-GSYM-KEEP-NEXT: [   0] 0x{{[0-9a-fA-F]+}}23 24# CHECK-GSYM-KEEP:      Address Info Offsets:25# CHECK-GSYM-KEEP-NEXT: INDEX  Offset26# CHECK-GSYM-KEEP-NEXT: ====== ==========27# CHECK-GSYM-KEEP-NEXT: [   0] 0x{{[0-9a-fA-F]+}}28 29# CHECK-GSYM-KEEP:      Files:30# CHECK-GSYM-KEEP-NEXT: INDEX  DIRECTORY  BASENAME   PATH31# CHECK-GSYM-KEEP-NEXT: ====== ========== ========== ==============================32# CHECK-GSYM-KEEP-NEXT: [   0] 0x{{[0-9a-fA-F]+}} 0x{{[0-9a-fA-F]+}}33# CHECK-GSYM-KEEP-NEXT: [   1] 0x{{[0-9a-fA-F]+}} 0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp34# CHECK-GSYM-KEEP-NEXT: [   2] 0x{{[0-9a-fA-F]+}} 0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp35# CHECK-GSYM-KEEP-NEXT: [   3] 0x{{[0-9a-fA-F]+}} 0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp36 37# CHECK-GSYM-KEEP:      FunctionInfo @ 0x{{[0-9a-fA-F]+}}: [0x{{[0-9a-fA-F]+}} - 0x{{[0-9a-fA-F]+}}) "my_func_01"38# CHECK-GSYM-KEEP-NEXT: LineTable:39# CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:540# CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:741# CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:942# CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:843# CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:1144# CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:1045# CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:646# CHECK-GSYM-KEEP-NEXT: ++ Merged FunctionInfos[0]:47# CHECK-GSYM-KEEP-NEXT:     [0x{{[0-9a-fA-F]+}} - 0x{{[0-9a-fA-F]+}}) "my_func_02"48# CHECK-GSYM-KEEP-NEXT:     LineTable:49# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp:550# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp:751# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp:952# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp:853# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp:1154# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp:1055# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp:656# CHECK-GSYM-KEEP-NEXT: ++ Merged FunctionInfos[1]:57# CHECK-GSYM-KEEP-NEXT:     [0x{{[0-9a-fA-F]+}} - 0x{{[0-9a-fA-F]+}}) "my_func_03"58# CHECK-GSYM-KEEP-NEXT:     LineTable:59# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp:560# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp:761# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp:962# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp:863# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp:1164# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp:1065# CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp:666 67## Test the lookup functionality for merged functions:68# RUN: llvm-gsymutil --verify %t.keep.gSYM --address 0x248 --merged-functions | FileCheck --check-prefix=CHECK-MERGED-LOOKUP %s69# RUN: llvm-gsymutil --verify %t.keep.gSYM --address 0x248 | FileCheck --check-prefix=CHECK-NORMAL-LOOKUP %s70 71 72# CHECK-MERGED-LOOKUP: Found 3 functions at address 0x0000000000000248:73# CHECK-MERGED-LOOKUP-NEXT:       0x0000000000000248: my_func_01 @ /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:574# CHECK-MERGED-LOOKUP-NEXT-NEXT:  0x0000000000000248: my_func_02 @ /tmp/test_gsym_yaml{{[/\\]}}out/file_02.cpp:575# CHECK-MERGED-LOOKUP-NEXT-NEXT:  0x0000000000000248: my_func_03 @ /tmp/test_gsym_yaml{{[/\\]}}out/file_03.cpp:576 77# CHECK-NORMAL-LOOKUP: 0x0000000000000248: my_func_01 @ /tmp/test_gsym_yaml{{[/\\]}}out/file_01.cpp:578 79 80--- !mach-o81FileHeader:82  magic:           0xFEEDFACF83  cputype:         0x100000C84  cpusubtype:      0x085  filetype:        0xA86  ncmds:           687  sizeofcmds:      116888  flags:           0x089  reserved:        0x090LoadCommands:91  - cmd:             LC_UUID92    cmdsize:         2493    uuid:            4C4C44EA-5555-3144-A15B-1DD428F7F3A294  - cmd:             LC_BUILD_VERSION95    cmdsize:         2496    platform:        197    minos:           72089698    sdk:             72089699    ntools:          0100  - cmd:             LC_SYMTAB101    cmdsize:         24102    symoff:          4096103    nsyms:           3104    stroff:          4144105    strsize:         38106  - cmd:             LC_SEGMENT_64107    cmdsize:         152108    segname:         __TEXT109    vmaddr:          0110    vmsize:          16384111    fileoff:         0112    filesize:        0113    maxprot:         5114    initprot:        5115    nsects:          1116    flags:           0117    Sections:118      - sectname:        __text119        segname:         __TEXT120        addr:            0x248121        size:            40122        offset:          0x0123        align:           2124        reloff:          0x0125        nreloc:          0126        flags:           0x80000400127        reserved1:       0x0128        reserved2:       0x0129        reserved3:       0x0130        content:         CFFAEDFE0C000001000000000A000000060000009004000000000000000000001B00000018000000131  - cmd:             LC_SEGMENT_64132    cmdsize:         72133    segname:         __LINKEDIT134    vmaddr:          16384135    vmsize:          4096136    fileoff:         4096137    filesize:        86138    maxprot:         1139    initprot:        1140    nsects:          0141    flags:           0142  - cmd:             LC_SEGMENT_64143    cmdsize:         872144    segname:         __DWARF145    vmaddr:          20480146    vmsize:          4096147    fileoff:         8192148    filesize:        1405149    maxprot:         7150    initprot:        3151    nsects:          10152    flags:           0153    Sections:154      - sectname:        __debug_line155        segname:         __DWARF156        addr:            0x5000157        size:            234158        offset:          0x2000159        align:           0160        reloff:          0x0161        nreloc:          0162        flags:           0x0163        reserved1:       0x0164        reserved2:       0x0165        reserved3:       0x0166      - sectname:        __debug_aranges167        segname:         __DWARF168        addr:            0x50EA169        size:            144170        offset:          0x20EA171        align:           0172        reloff:          0x0173        nreloc:          0174        flags:           0x0175        reserved1:       0x0176        reserved2:       0x0177        reserved3:       0x0178      - sectname:        __debug_info179        segname:         __DWARF180        addr:            0x517A181        size:            324182        offset:          0x217A183        align:           0184        reloff:          0x0185        nreloc:          0186        flags:           0x0187        reserved1:       0x0188        reserved2:       0x0189        reserved3:       0x0190      - sectname:        __debug_frame191        segname:         __DWARF192        addr:            0x52BE193        size:            120194        offset:          0x22BE195        align:           0196        reloff:          0x0197        nreloc:          0198        flags:           0x0199        reserved1:       0x0200        reserved2:       0x0201        reserved3:       0x0202        content:         14000000FFFFFFFF0400080001781E0C1F000000000000001C0000000000000048020000000000002800000000000000440E1000000000001C0000000000000048020000000000002800000000000000440E1000000000001C0000000000000048020000000000002800000000000000440E100000000000203      - sectname:        __debug_abbrev204        segname:         __DWARF205        addr:            0x5336206        size:            73207        offset:          0x2336208        align:           0209        reloff:          0x0210        nreloc:          0211        flags:           0x0212        reserved1:       0x0213        reserved2:       0x0214        reserved3:       0x0215      - sectname:        __debug_str216        segname:         __DWARF217        addr:            0x537F218        size:            221219        offset:          0x237F220        align:           0221        reloff:          0x0222        nreloc:          0223        flags:           0x0224        reserved1:       0x0225        reserved2:       0x0226        reserved3:       0x0227      - sectname:        __apple_namespac228        segname:         __DWARF229        addr:            0x545C230        size:            36231        offset:          0x245C232        align:           0233        reloff:          0x0234        nreloc:          0235        flags:           0x0236        reserved1:       0x0237        reserved2:       0x0238        reserved3:       0x0239        content:         485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF240      - sectname:        __apple_names241        segname:         __DWARF242        addr:            0x5480243        size:            116244        offset:          0x2480245        align:           0246        reloff:          0x0247        nreloc:          0248        flags:           0x0249        reserved1:       0x0250        reserved2:       0x0251        reserved3:       0x0252        content:         485341480100000003000000030000000C00000000000000010000000100060000000000010000000200000038450B6E36450B6E37450B6E440000005400000064000000D200000001000000060100000000000094000000010000002E00000000000000B7000000010000009A00000000000000253      - sectname:        __apple_types254        segname:         __DWARF255        addr:            0x54F4256        size:            101257        offset:          0x24F4258        align:           0259        reloff:          0x0260        nreloc:          0261        flags:           0x0262        reserved1:       0x0263        reserved2:       0x0264        reserved3:       0x0265        content:         48534148010000000100000001000000180000000000000004000000010006000300050005000B0006000600000000003080880B38000000A30000000300000064000000240000A4283A0CD0000000240000A4283A0C3C010000240000A4283A0C00000000266      - sectname:        __apple_objc267        segname:         __DWARF268        addr:            0x5559269        size:            36270        offset:          0x2559271        align:           0272        reloff:          0x0273        nreloc:          0274        flags:           0x0275        reserved1:       0x0276        reserved2:       0x0277        reserved3:       0x0278        content:         485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF279LinkEditData:280  NameList:281    - n_strx:          2282      n_type:          0xF283      n_sect:          1284      n_desc:          0285      n_value:         584286    - n_strx:          14287      n_type:          0xF288      n_sect:          1289      n_desc:          0290      n_value:         584291    - n_strx:          26292      n_type:          0xF293      n_sect:          1294      n_desc:          0295      n_value:         584296  StringTable:297    - ''298    - ''299    - _my_func_01300    - _my_func_02301    - _my_func_03302DWARF:303  debug_str:304    - ''305    - 'clang version 20.0.0git (https://github.com/alx32/llvm-project.git cfb92be0a9cdd0f4595100c5add4e2795a44134e)'306    - 'out/file_01.cpp'307    - '/'308    - '/tmp/test_gsym_yaml'309    - my_func_01310    - a311    - b312    - int313    - 'out/file_02.cpp'314    - my_func_02315    - 'out/file_03.cpp'316    - my_func_03317  debug_abbrev:318    - ID:              0319      Table:320        - Code:            0x1321          Tag:             DW_TAG_compile_unit322          Children:        DW_CHILDREN_yes323          Attributes:324            - Attribute:       DW_AT_producer325              Form:            DW_FORM_strp326            - Attribute:       DW_AT_language327              Form:            DW_FORM_data2328            - Attribute:       DW_AT_name329              Form:            DW_FORM_strp330            - Attribute:       DW_AT_LLVM_sysroot331              Form:            DW_FORM_strp332            - Attribute:       DW_AT_stmt_list333              Form:            DW_FORM_sec_offset334            - Attribute:       DW_AT_comp_dir335              Form:            DW_FORM_strp336            - Attribute:       DW_AT_low_pc337              Form:            DW_FORM_addr338            - Attribute:       DW_AT_high_pc339              Form:            DW_FORM_data4340        - Code:            0x2341          Tag:             DW_TAG_subprogram342          Children:        DW_CHILDREN_yes343          Attributes:344            - Attribute:       DW_AT_low_pc345              Form:            DW_FORM_addr346            - Attribute:       DW_AT_high_pc347              Form:            DW_FORM_data4348            - Attribute:       DW_AT_APPLE_omit_frame_ptr349              Form:            DW_FORM_flag_present350            - Attribute:       DW_AT_frame_base351              Form:            DW_FORM_exprloc352            - Attribute:       DW_AT_name353              Form:            DW_FORM_strp354            - Attribute:       DW_AT_decl_file355              Form:            DW_FORM_data1356            - Attribute:       DW_AT_decl_line357              Form:            DW_FORM_data1358            - Attribute:       DW_AT_type359              Form:            DW_FORM_ref_addr360            - Attribute:       DW_AT_external361              Form:            DW_FORM_flag_present362        - Code:            0x3363          Tag:             DW_TAG_formal_parameter364          Children:        DW_CHILDREN_no365          Attributes:366            - Attribute:       DW_AT_location367              Form:            DW_FORM_exprloc368            - Attribute:       DW_AT_name369              Form:            DW_FORM_strp370            - Attribute:       DW_AT_decl_file371              Form:            DW_FORM_data1372            - Attribute:       DW_AT_decl_line373              Form:            DW_FORM_data1374            - Attribute:       DW_AT_type375              Form:            DW_FORM_ref_addr376        - Code:            0x4377          Tag:             DW_TAG_base_type378          Children:        DW_CHILDREN_no379          Attributes:380            - Attribute:       DW_AT_name381              Form:            DW_FORM_strp382            - Attribute:       DW_AT_encoding383              Form:            DW_FORM_data1384            - Attribute:       DW_AT_byte_size385              Form:            DW_FORM_data1386  debug_aranges:387    - Length:          0x2C388      Version:         2389      CuOffset:        0x0390      AddressSize:     0x8391      Descriptors:392        - Address:         0x248393          Length:          0x28394    - Length:          0x2C395      Version:         2396      CuOffset:        0x6C397      AddressSize:     0x8398      Descriptors:399        - Address:         0x248400          Length:          0x28401    - Length:          0x2C402      Version:         2403      CuOffset:        0xD8404      AddressSize:     0x8405      Descriptors:406        - Address:         0x248407          Length:          0x28408  debug_info:409    - Length:          0x68410      Version:         4411      AbbrevTableID:   0412      AbbrOffset:      0x0413      AddrSize:        8414      Entries:415        - AbbrCode:        0x1416          Values:417            - Value:           0x1418            - Value:           0x21419            - Value:           0x6E420            - Value:           0x7E421            - Value:           0x0422            - Value:           0x80423            - Value:           0x248424            - Value:           0x28425        - AbbrCode:        0x2426          Values:427            - Value:           0x248428            - Value:           0x28429            - Value:           0x1430            - Value:           0x1431              BlockData:       [ 0x6F ]432            - Value:           0x94433            - Value:           0x1434            - Value:           0x2435            - Value:           0x64436            - Value:           0x1437        - AbbrCode:        0x3438          Values:439            - Value:           0x2440              BlockData:       [ 0x91, 0xC ]441            - Value:           0x9F442            - Value:           0x1443            - Value:           0x3444            - Value:           0x64445        - AbbrCode:        0x3446          Values:447            - Value:           0x2448              BlockData:       [ 0x91, 0x8 ]449            - Value:           0xA1450            - Value:           0x1451            - Value:           0x4452            - Value:           0x64453        - AbbrCode:        0x0454        - AbbrCode:        0x4455          Values:456            - Value:           0xA3457            - Value:           0x5458            - Value:           0x4459        - AbbrCode:        0x0460    - Length:          0x68461      Version:         4462      AbbrevTableID:   0463      AbbrOffset:      0x0464      AddrSize:        8465      Entries:466        - AbbrCode:        0x1467          Values:468            - Value:           0x1469            - Value:           0x21470            - Value:           0xA7471            - Value:           0x7E472            - Value:           0x4E473            - Value:           0x80474            - Value:           0x248475            - Value:           0x28476        - AbbrCode:        0x2477          Values:478            - Value:           0x248479            - Value:           0x28480            - Value:           0x1481            - Value:           0x1482              BlockData:       [ 0x6F ]483            - Value:           0xB7484            - Value:           0x1485            - Value:           0x2486            - Value:           0xD0487            - Value:           0x1488        - AbbrCode:        0x3489          Values:490            - Value:           0x2491              BlockData:       [ 0x91, 0xC ]492            - Value:           0x9F493            - Value:           0x1494            - Value:           0x3495            - Value:           0xD0496        - AbbrCode:        0x3497          Values:498            - Value:           0x2499              BlockData:       [ 0x91, 0x8 ]500            - Value:           0xA1501            - Value:           0x1502            - Value:           0x4503            - Value:           0xD0504        - AbbrCode:        0x0505        - AbbrCode:        0x4506          Values:507            - Value:           0xA3508            - Value:           0x5509            - Value:           0x4510        - AbbrCode:        0x0511    - Length:          0x68512      Version:         4513      AbbrevTableID:   0514      AbbrOffset:      0x0515      AddrSize:        8516      Entries:517        - AbbrCode:        0x1518          Values:519            - Value:           0x1520            - Value:           0x21521            - Value:           0xC2522            - Value:           0x7E523            - Value:           0x9C524            - Value:           0x80525            - Value:           0x248526            - Value:           0x28527        - AbbrCode:        0x2528          Values:529            - Value:           0x248530            - Value:           0x28531            - Value:           0x1532            - Value:           0x1533              BlockData:       [ 0x6F ]534            - Value:           0xD2535            - Value:           0x1536            - Value:           0x2537            - Value:           0x13C538            - Value:           0x1539        - AbbrCode:        0x3540          Values:541            - Value:           0x2542              BlockData:       [ 0x91, 0xC ]543            - Value:           0x9F544            - Value:           0x1545            - Value:           0x3546            - Value:           0x13C547        - AbbrCode:        0x3548          Values:549            - Value:           0x2550              BlockData:       [ 0x91, 0x8 ]551            - Value:           0xA1552            - Value:           0x1553            - Value:           0x4554            - Value:           0x13C555        - AbbrCode:        0x0556        - AbbrCode:        0x4557          Values:558            - Value:           0xA3559            - Value:           0x5560            - Value:           0x4561        - AbbrCode:        0x0562  debug_line:563    - Length:          74564      Version:         4565      PrologueLength:  39566      MinInstLength:   1567      MaxOpsPerInst:   1568      DefaultIsStmt:   1569      LineBase:        251570      LineRange:       14571      OpcodeBase:      13572      StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]573      IncludeDirs:574        - out575      Files:576        - Name:            file_01.cpp577          DirIdx:          1578          ModTime:         0579          Length:          0580      Opcodes:581        - Opcode:          DW_LNS_extended_op582          ExtLen:          9583          SubOpcode:       DW_LNE_set_address584          Data:            584585        - Opcode:          0x16586          Data:            0587        - Opcode:          DW_LNS_set_column588          Data:            7589        - Opcode:          DW_LNS_set_prologue_end590          Data:            0591        - Opcode:          0xBC592          Data:            0593        - Opcode:          0x4C594          Data:            0595        - Opcode:          0x49596          Data:            0597        - Opcode:          0x4D598          Data:            0599        - Opcode:          0x49600          Data:            0601        - Opcode:          DW_LNS_set_column602          Data:            5603        - Opcode:          DW_LNS_set_epilogue_begin604          Data:            0605        - Opcode:          0x46606          Data:            0607        - Opcode:          DW_LNS_advance_pc608          Data:            8609        - Opcode:          DW_LNS_extended_op610          ExtLen:          1611          SubOpcode:       DW_LNE_end_sequence612          Data:            0613    - Length:          74614      Version:         4615      PrologueLength:  39616      MinInstLength:   1617      MaxOpsPerInst:   1618      DefaultIsStmt:   1619      LineBase:        251620      LineRange:       14621      OpcodeBase:      13622      StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]623      IncludeDirs:624        - out625      Files:626        - Name:            file_02.cpp627          DirIdx:          1628          ModTime:         0629          Length:          0630      Opcodes:631        - Opcode:          DW_LNS_extended_op632          ExtLen:          9633          SubOpcode:       DW_LNE_set_address634          Data:            584635        - Opcode:          0x16636          Data:            0637        - Opcode:          DW_LNS_set_column638          Data:            7639        - Opcode:          DW_LNS_set_prologue_end640          Data:            0641        - Opcode:          0xBC642          Data:            0643        - Opcode:          0x4C644          Data:            0645        - Opcode:          0x49646          Data:            0647        - Opcode:          0x4D648          Data:            0649        - Opcode:          0x49650          Data:            0651        - Opcode:          DW_LNS_set_column652          Data:            5653        - Opcode:          DW_LNS_set_epilogue_begin654          Data:            0655        - Opcode:          0x46656          Data:            0657        - Opcode:          DW_LNS_advance_pc658          Data:            8659        - Opcode:          DW_LNS_extended_op660          ExtLen:          1661          SubOpcode:       DW_LNE_end_sequence662          Data:            0663    - Length:          74664      Version:         4665      PrologueLength:  39666      MinInstLength:   1667      MaxOpsPerInst:   1668      DefaultIsStmt:   1669      LineBase:        251670      LineRange:       14671      OpcodeBase:      13672      StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]673      IncludeDirs:674        - out675      Files:676        - Name:            file_03.cpp677          DirIdx:          1678          ModTime:         0679          Length:          0680      Opcodes:681        - Opcode:          DW_LNS_extended_op682          ExtLen:          9683          SubOpcode:       DW_LNE_set_address684          Data:            584685        - Opcode:          0x16686          Data:            0687        - Opcode:          DW_LNS_set_column688          Data:            7689        - Opcode:          DW_LNS_set_prologue_end690          Data:            0691        - Opcode:          0xBC692          Data:            0693        - Opcode:          0x4C694          Data:            0695        - Opcode:          0x49696          Data:            0697        - Opcode:          0x4D698          Data:            0699        - Opcode:          0x49700          Data:            0701        - Opcode:          DW_LNS_set_column702          Data:            5703        - Opcode:          DW_LNS_set_epilogue_begin704          Data:            0705        - Opcode:          0x46706          Data:            0707        - Opcode:          DW_LNS_advance_pc708          Data:            8709        - Opcode:          DW_LNS_extended_op710          ExtLen:          1711          SubOpcode:       DW_LNE_end_sequence712          Data:            0713...714 715 716###################################################################################717############################# yaml generation script ##############################718# #!/bin/bash719# set -ex720# # Global variable for LLVM toolchain path721# TOOLCHAIN_PATH=[...]722# # Switch to the script directory723# cd "$(dirname "$0")"724# # Create and clean 'out' directory725# mkdir -p out726# rm -rf out/*727# # Generate C++ files728# for i in {1..3}; do729#     cat << EOF > out/file_0${i}.cpp730# extern "C" int my_func_0${i}(731#     int a,732#     int b)733# {734#     return735#       a736#       *737#       a738#       +739#       b;740# }741# EOF742# done743# # Compile to object files with debug info744# for i in {1..3}; do745#     ${TOOLCHAIN_PATH}/bin/clang++  \746#     -fno-unwind-tables -fno-asynchronous-unwind-tables  \747#     -target arm64-apple-macos -c -g out/file_0${i}.cpp -o out/file_0${i}.o748# done749# # Link object files to dylib using lld directly750# ${TOOLCHAIN_PATH}/bin/ld64.lld \751#     -dylib \752#     -arch arm64 \753#     -platform_version macos 11.0 11.0 \754#     -o out/libmyfuncs.dylib \755#     --icf=all --keep-icf-stabs \756#     -o out/mydylib out/file_01.o out/file_02.o out/file_03.o757# # Create dsym with --flat option758# "$TOOLCHAIN_PATH/bin/dsymutil" --flat out/mydylib -o out/mydylib.dSYM759# # Convert dsym to yaml760# "$TOOLCHAIN_PATH/bin/obj2yaml" out/mydylib.dSYM > out/mydylib.yaml761###################################################################################762