[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / llvm / test / tools / llvm-gsymutil / ARM_AArch64 / macho-merged-funcs-dwarf.yaml
blob94a162c5f2120d449081373c5d7e7a8ed22f4007
1 # RUN: yaml2obj %s -o %t.dSYM
3 ## Verify that we don't keep merged functions by default
4 # RUN: llvm-gsymutil --convert %t.dSYM --out-file=%t.default.gSYM
5 # RUN: llvm-gsymutil --verify --verbose %t.default.gSYM | FileCheck --check-prefix=CHECK-GSYM-DEFAULT %s
7 ## Verify that we keep merged functions when specyfing --merged-functions
8 # RUN: llvm-gsymutil --convert %t.dSYM --out-file=%t.keep.gSYM --merged-functions
9 # RUN: llvm-gsymutil --verify --verbose %t.keep.gSYM | FileCheck --check-prefix=CHECK-GSYM-KEEP %s
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 / offsets
15 # CHECK-GSYM-DEFAULT-NOT: Merged FunctionInfos
16 # CHECK-GSYM-DEFAULT:      FunctionInfo @ 0x{{[0-9a-fA-F]+}}: [0x{{[0-9a-fA-F]+}} - 0x{{[0-9a-fA-F]+}}) "my_func_0{{[1-3]}}"
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]+}}
24 # CHECK-GSYM-KEEP:      Address Info Offsets:
25 # CHECK-GSYM-KEEP-NEXT: INDEX  Offset
26 # CHECK-GSYM-KEEP-NEXT: ====== ==========
27 # CHECK-GSYM-KEEP-NEXT: [   0] 0x{{[0-9a-fA-F]+}}
29 # CHECK-GSYM-KEEP:      Files:
30 # CHECK-GSYM-KEEP-NEXT: INDEX  DIRECTORY  BASENAME   PATH
31 # 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_0{{[1-3]}}.cpp
34 # CHECK-GSYM-KEEP-NEXT: [   2] 0x{{[0-9a-fA-F]+}} 0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp
35 # CHECK-GSYM-KEEP-NEXT: [   3] 0x{{[0-9a-fA-F]+}} 0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp
37 # CHECK-GSYM-KEEP:      FunctionInfo @ 0x{{[0-9a-fA-F]+}}: [0x{{[0-9a-fA-F]+}} - 0x{{[0-9a-fA-F]+}}) "my_func_0{{[1-3]}}"
38 # CHECK-GSYM-KEEP-NEXT: LineTable:
39 # CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:5
40 # CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:7
41 # CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:9
42 # CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:8
43 # CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:11
44 # CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:10
45 # CHECK-GSYM-KEEP-NEXT:   0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:6
46 # CHECK-GSYM-KEEP-NEXT: ++ Merged FunctionInfos[0]:
47 # CHECK-GSYM-KEEP-NEXT:     [0x{{[0-9a-fA-F]+}} - 0x{{[0-9a-fA-F]+}}) "my_func_0{{[1-3]}}"
48 # CHECK-GSYM-KEEP-NEXT:     LineTable:
49 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:5
50 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:7
51 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:9
52 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:8
53 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:11
54 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:10
55 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:6
56 # CHECK-GSYM-KEEP-NEXT: ++ Merged FunctionInfos[1]:
57 # CHECK-GSYM-KEEP-NEXT:     [0x{{[0-9a-fA-F]+}} - 0x{{[0-9a-fA-F]+}}) "my_func_0{{[1-3]}}"
58 # CHECK-GSYM-KEEP-NEXT:     LineTable:
59 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:5
60 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:7
61 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:9
62 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:8
63 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:11
64 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:10
65 # CHECK-GSYM-KEEP-NEXT:       0x{{[0-9a-fA-F]+}} /tmp/test_gsym_yaml{{[/\\]}}out/file_0{{[1-3]}}.cpp:6
69 --- !mach-o
70 FileHeader:
71   magic:           0xFEEDFACF
72   cputype:         0x100000C
73   cpusubtype:      0x0
74   filetype:        0xA
75   ncmds:           6
76   sizeofcmds:      1168
77   flags:           0x0
78   reserved:        0x0
79 LoadCommands:
80   - cmd:             LC_UUID
81     cmdsize:         24
82     uuid:            4C4C44EA-5555-3144-A15B-1DD428F7F3A2
83   - cmd:             LC_BUILD_VERSION
84     cmdsize:         24
85     platform:        1
86     minos:           720896
87     sdk:             720896
88     ntools:          0
89   - cmd:             LC_SYMTAB
90     cmdsize:         24
91     symoff:          4096
92     nsyms:           3
93     stroff:          4144
94     strsize:         38
95   - cmd:             LC_SEGMENT_64
96     cmdsize:         152
97     segname:         __TEXT
98     vmaddr:          0
99     vmsize:          16384
100     fileoff:         0
101     filesize:        0
102     maxprot:         5
103     initprot:        5
104     nsects:          1
105     flags:           0
106     Sections:
107       - sectname:        __text
108         segname:         __TEXT
109         addr:            0x248
110         size:            40
111         offset:          0x0
112         align:           2
113         reloff:          0x0
114         nreloc:          0
115         flags:           0x80000400
116         reserved1:       0x0
117         reserved2:       0x0
118         reserved3:       0x0
119         content:         CFFAEDFE0C000001000000000A000000060000009004000000000000000000001B00000018000000
120   - cmd:             LC_SEGMENT_64
121     cmdsize:         72
122     segname:         __LINKEDIT
123     vmaddr:          16384
124     vmsize:          4096
125     fileoff:         4096
126     filesize:        86
127     maxprot:         1
128     initprot:        1
129     nsects:          0
130     flags:           0
131   - cmd:             LC_SEGMENT_64
132     cmdsize:         872
133     segname:         __DWARF
134     vmaddr:          20480
135     vmsize:          4096
136     fileoff:         8192
137     filesize:        1405
138     maxprot:         7
139     initprot:        3
140     nsects:          10
141     flags:           0
142     Sections:
143       - sectname:        __debug_line
144         segname:         __DWARF
145         addr:            0x5000
146         size:            234
147         offset:          0x2000
148         align:           0
149         reloff:          0x0
150         nreloc:          0
151         flags:           0x0
152         reserved1:       0x0
153         reserved2:       0x0
154         reserved3:       0x0
155       - sectname:        __debug_aranges
156         segname:         __DWARF
157         addr:            0x50EA
158         size:            144
159         offset:          0x20EA
160         align:           0
161         reloff:          0x0
162         nreloc:          0
163         flags:           0x0
164         reserved1:       0x0
165         reserved2:       0x0
166         reserved3:       0x0
167       - sectname:        __debug_info
168         segname:         __DWARF
169         addr:            0x517A
170         size:            324
171         offset:          0x217A
172         align:           0
173         reloff:          0x0
174         nreloc:          0
175         flags:           0x0
176         reserved1:       0x0
177         reserved2:       0x0
178         reserved3:       0x0
179       - sectname:        __debug_frame
180         segname:         __DWARF
181         addr:            0x52BE
182         size:            120
183         offset:          0x22BE
184         align:           0
185         reloff:          0x0
186         nreloc:          0
187         flags:           0x0
188         reserved1:       0x0
189         reserved2:       0x0
190         reserved3:       0x0
191         content:         14000000FFFFFFFF0400080001781E0C1F000000000000001C0000000000000048020000000000002800000000000000440E1000000000001C0000000000000048020000000000002800000000000000440E1000000000001C0000000000000048020000000000002800000000000000440E100000000000
192       - sectname:        __debug_abbrev
193         segname:         __DWARF
194         addr:            0x5336
195         size:            73
196         offset:          0x2336
197         align:           0
198         reloff:          0x0
199         nreloc:          0
200         flags:           0x0
201         reserved1:       0x0
202         reserved2:       0x0
203         reserved3:       0x0
204       - sectname:        __debug_str
205         segname:         __DWARF
206         addr:            0x537F
207         size:            221
208         offset:          0x237F
209         align:           0
210         reloff:          0x0
211         nreloc:          0
212         flags:           0x0
213         reserved1:       0x0
214         reserved2:       0x0
215         reserved3:       0x0
216       - sectname:        __apple_namespac
217         segname:         __DWARF
218         addr:            0x545C
219         size:            36
220         offset:          0x245C
221         align:           0
222         reloff:          0x0
223         nreloc:          0
224         flags:           0x0
225         reserved1:       0x0
226         reserved2:       0x0
227         reserved3:       0x0
228         content:         485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF
229       - sectname:        __apple_names
230         segname:         __DWARF
231         addr:            0x5480
232         size:            116
233         offset:          0x2480
234         align:           0
235         reloff:          0x0
236         nreloc:          0
237         flags:           0x0
238         reserved1:       0x0
239         reserved2:       0x0
240         reserved3:       0x0
241         content:         485341480100000003000000030000000C00000000000000010000000100060000000000010000000200000038450B6E36450B6E37450B6E440000005400000064000000D200000001000000060100000000000094000000010000002E00000000000000B7000000010000009A00000000000000
242       - sectname:        __apple_types
243         segname:         __DWARF
244         addr:            0x54F4
245         size:            101
246         offset:          0x24F4
247         align:           0
248         reloff:          0x0
249         nreloc:          0
250         flags:           0x0
251         reserved1:       0x0
252         reserved2:       0x0
253         reserved3:       0x0
254         content:         48534148010000000100000001000000180000000000000004000000010006000300050005000B0006000600000000003080880B38000000A30000000300000064000000240000A4283A0CD0000000240000A4283A0C3C010000240000A4283A0C00000000
255       - sectname:        __apple_objc
256         segname:         __DWARF
257         addr:            0x5559
258         size:            36
259         offset:          0x2559
260         align:           0
261         reloff:          0x0
262         nreloc:          0
263         flags:           0x0
264         reserved1:       0x0
265         reserved2:       0x0
266         reserved3:       0x0
267         content:         485341480100000001000000000000000C000000000000000100000001000600FFFFFFFF
268 LinkEditData:
269   NameList:
270     - n_strx:          2
271       n_type:          0xF
272       n_sect:          1
273       n_desc:          0
274       n_value:         584
275     - n_strx:          14
276       n_type:          0xF
277       n_sect:          1
278       n_desc:          0
279       n_value:         584
280     - n_strx:          26
281       n_type:          0xF
282       n_sect:          1
283       n_desc:          0
284       n_value:         584
285   StringTable:
286     - ''
287     - ''
288     - _my_func_01
289     - _my_func_02
290     - _my_func_03
291 DWARF:
292   debug_str:
293     - ''
294     - 'clang version 20.0.0git (https://github.com/alx32/llvm-project.git cfb92be0a9cdd0f4595100c5add4e2795a44134e)'
295     - 'out/file_01.cpp'
296     - '/'
297     - '/tmp/test_gsym_yaml'
298     - my_func_01
299     - a
300     - b
301     - int
302     - 'out/file_02.cpp'
303     - my_func_02
304     - 'out/file_03.cpp'
305     - my_func_03
306   debug_abbrev:
307     - ID:              0
308       Table:
309         - Code:            0x1
310           Tag:             DW_TAG_compile_unit
311           Children:        DW_CHILDREN_yes
312           Attributes:
313             - Attribute:       DW_AT_producer
314               Form:            DW_FORM_strp
315             - Attribute:       DW_AT_language
316               Form:            DW_FORM_data2
317             - Attribute:       DW_AT_name
318               Form:            DW_FORM_strp
319             - Attribute:       DW_AT_LLVM_sysroot
320               Form:            DW_FORM_strp
321             - Attribute:       DW_AT_stmt_list
322               Form:            DW_FORM_sec_offset
323             - Attribute:       DW_AT_comp_dir
324               Form:            DW_FORM_strp
325             - Attribute:       DW_AT_low_pc
326               Form:            DW_FORM_addr
327             - Attribute:       DW_AT_high_pc
328               Form:            DW_FORM_data4
329         - Code:            0x2
330           Tag:             DW_TAG_subprogram
331           Children:        DW_CHILDREN_yes
332           Attributes:
333             - Attribute:       DW_AT_low_pc
334               Form:            DW_FORM_addr
335             - Attribute:       DW_AT_high_pc
336               Form:            DW_FORM_data4
337             - Attribute:       DW_AT_APPLE_omit_frame_ptr
338               Form:            DW_FORM_flag_present
339             - Attribute:       DW_AT_frame_base
340               Form:            DW_FORM_exprloc
341             - Attribute:       DW_AT_name
342               Form:            DW_FORM_strp
343             - Attribute:       DW_AT_decl_file
344               Form:            DW_FORM_data1
345             - Attribute:       DW_AT_decl_line
346               Form:            DW_FORM_data1
347             - Attribute:       DW_AT_type
348               Form:            DW_FORM_ref_addr
349             - Attribute:       DW_AT_external
350               Form:            DW_FORM_flag_present
351         - Code:            0x3
352           Tag:             DW_TAG_formal_parameter
353           Children:        DW_CHILDREN_no
354           Attributes:
355             - Attribute:       DW_AT_location
356               Form:            DW_FORM_exprloc
357             - Attribute:       DW_AT_name
358               Form:            DW_FORM_strp
359             - Attribute:       DW_AT_decl_file
360               Form:            DW_FORM_data1
361             - Attribute:       DW_AT_decl_line
362               Form:            DW_FORM_data1
363             - Attribute:       DW_AT_type
364               Form:            DW_FORM_ref_addr
365         - Code:            0x4
366           Tag:             DW_TAG_base_type
367           Children:        DW_CHILDREN_no
368           Attributes:
369             - Attribute:       DW_AT_name
370               Form:            DW_FORM_strp
371             - Attribute:       DW_AT_encoding
372               Form:            DW_FORM_data1
373             - Attribute:       DW_AT_byte_size
374               Form:            DW_FORM_data1
375   debug_aranges:
376     - Length:          0x2C
377       Version:         2
378       CuOffset:        0x0
379       AddressSize:     0x8
380       Descriptors:
381         - Address:         0x248
382           Length:          0x28
383     - Length:          0x2C
384       Version:         2
385       CuOffset:        0x6C
386       AddressSize:     0x8
387       Descriptors:
388         - Address:         0x248
389           Length:          0x28
390     - Length:          0x2C
391       Version:         2
392       CuOffset:        0xD8
393       AddressSize:     0x8
394       Descriptors:
395         - Address:         0x248
396           Length:          0x28
397   debug_info:
398     - Length:          0x68
399       Version:         4
400       AbbrevTableID:   0
401       AbbrOffset:      0x0
402       AddrSize:        8
403       Entries:
404         - AbbrCode:        0x1
405           Values:
406             - Value:           0x1
407             - Value:           0x21
408             - Value:           0x6E
409             - Value:           0x7E
410             - Value:           0x0
411             - Value:           0x80
412             - Value:           0x248
413             - Value:           0x28
414         - AbbrCode:        0x2
415           Values:
416             - Value:           0x248
417             - Value:           0x28
418             - Value:           0x1
419             - Value:           0x1
420               BlockData:       [ 0x6F ]
421             - Value:           0x94
422             - Value:           0x1
423             - Value:           0x2
424             - Value:           0x64
425             - Value:           0x1
426         - AbbrCode:        0x3
427           Values:
428             - Value:           0x2
429               BlockData:       [ 0x91, 0xC ]
430             - Value:           0x9F
431             - Value:           0x1
432             - Value:           0x3
433             - Value:           0x64
434         - AbbrCode:        0x3
435           Values:
436             - Value:           0x2
437               BlockData:       [ 0x91, 0x8 ]
438             - Value:           0xA1
439             - Value:           0x1
440             - Value:           0x4
441             - Value:           0x64
442         - AbbrCode:        0x0
443         - AbbrCode:        0x4
444           Values:
445             - Value:           0xA3
446             - Value:           0x5
447             - Value:           0x4
448         - AbbrCode:        0x0
449     - Length:          0x68
450       Version:         4
451       AbbrevTableID:   0
452       AbbrOffset:      0x0
453       AddrSize:        8
454       Entries:
455         - AbbrCode:        0x1
456           Values:
457             - Value:           0x1
458             - Value:           0x21
459             - Value:           0xA7
460             - Value:           0x7E
461             - Value:           0x4E
462             - Value:           0x80
463             - Value:           0x248
464             - Value:           0x28
465         - AbbrCode:        0x2
466           Values:
467             - Value:           0x248
468             - Value:           0x28
469             - Value:           0x1
470             - Value:           0x1
471               BlockData:       [ 0x6F ]
472             - Value:           0xB7
473             - Value:           0x1
474             - Value:           0x2
475             - Value:           0xD0
476             - Value:           0x1
477         - AbbrCode:        0x3
478           Values:
479             - Value:           0x2
480               BlockData:       [ 0x91, 0xC ]
481             - Value:           0x9F
482             - Value:           0x1
483             - Value:           0x3
484             - Value:           0xD0
485         - AbbrCode:        0x3
486           Values:
487             - Value:           0x2
488               BlockData:       [ 0x91, 0x8 ]
489             - Value:           0xA1
490             - Value:           0x1
491             - Value:           0x4
492             - Value:           0xD0
493         - AbbrCode:        0x0
494         - AbbrCode:        0x4
495           Values:
496             - Value:           0xA3
497             - Value:           0x5
498             - Value:           0x4
499         - AbbrCode:        0x0
500     - Length:          0x68
501       Version:         4
502       AbbrevTableID:   0
503       AbbrOffset:      0x0
504       AddrSize:        8
505       Entries:
506         - AbbrCode:        0x1
507           Values:
508             - Value:           0x1
509             - Value:           0x21
510             - Value:           0xC2
511             - Value:           0x7E
512             - Value:           0x9C
513             - Value:           0x80
514             - Value:           0x248
515             - Value:           0x28
516         - AbbrCode:        0x2
517           Values:
518             - Value:           0x248
519             - Value:           0x28
520             - Value:           0x1
521             - Value:           0x1
522               BlockData:       [ 0x6F ]
523             - Value:           0xD2
524             - Value:           0x1
525             - Value:           0x2
526             - Value:           0x13C
527             - Value:           0x1
528         - AbbrCode:        0x3
529           Values:
530             - Value:           0x2
531               BlockData:       [ 0x91, 0xC ]
532             - Value:           0x9F
533             - Value:           0x1
534             - Value:           0x3
535             - Value:           0x13C
536         - AbbrCode:        0x3
537           Values:
538             - Value:           0x2
539               BlockData:       [ 0x91, 0x8 ]
540             - Value:           0xA1
541             - Value:           0x1
542             - Value:           0x4
543             - Value:           0x13C
544         - AbbrCode:        0x0
545         - AbbrCode:        0x4
546           Values:
547             - Value:           0xA3
548             - Value:           0x5
549             - Value:           0x4
550         - AbbrCode:        0x0
551   debug_line:
552     - Length:          74
553       Version:         4
554       PrologueLength:  39
555       MinInstLength:   1
556       MaxOpsPerInst:   1
557       DefaultIsStmt:   1
558       LineBase:        251
559       LineRange:       14
560       OpcodeBase:      13
561       StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
562       IncludeDirs:
563         - out
564       Files:
565         - Name:            file_01.cpp
566           DirIdx:          1
567           ModTime:         0
568           Length:          0
569       Opcodes:
570         - Opcode:          DW_LNS_extended_op
571           ExtLen:          9
572           SubOpcode:       DW_LNE_set_address
573           Data:            584
574         - Opcode:          0x16
575           Data:            0
576         - Opcode:          DW_LNS_set_column
577           Data:            7
578         - Opcode:          DW_LNS_set_prologue_end
579           Data:            0
580         - Opcode:          0xBC
581           Data:            0
582         - Opcode:          0x4C
583           Data:            0
584         - Opcode:          0x49
585           Data:            0
586         - Opcode:          0x4D
587           Data:            0
588         - Opcode:          0x49
589           Data:            0
590         - Opcode:          DW_LNS_set_column
591           Data:            5
592         - Opcode:          DW_LNS_set_epilogue_begin
593           Data:            0
594         - Opcode:          0x46
595           Data:            0
596         - Opcode:          DW_LNS_advance_pc
597           Data:            8
598         - Opcode:          DW_LNS_extended_op
599           ExtLen:          1
600           SubOpcode:       DW_LNE_end_sequence
601           Data:            0
602     - Length:          74
603       Version:         4
604       PrologueLength:  39
605       MinInstLength:   1
606       MaxOpsPerInst:   1
607       DefaultIsStmt:   1
608       LineBase:        251
609       LineRange:       14
610       OpcodeBase:      13
611       StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
612       IncludeDirs:
613         - out
614       Files:
615         - Name:            file_02.cpp
616           DirIdx:          1
617           ModTime:         0
618           Length:          0
619       Opcodes:
620         - Opcode:          DW_LNS_extended_op
621           ExtLen:          9
622           SubOpcode:       DW_LNE_set_address
623           Data:            584
624         - Opcode:          0x16
625           Data:            0
626         - Opcode:          DW_LNS_set_column
627           Data:            7
628         - Opcode:          DW_LNS_set_prologue_end
629           Data:            0
630         - Opcode:          0xBC
631           Data:            0
632         - Opcode:          0x4C
633           Data:            0
634         - Opcode:          0x49
635           Data:            0
636         - Opcode:          0x4D
637           Data:            0
638         - Opcode:          0x49
639           Data:            0
640         - Opcode:          DW_LNS_set_column
641           Data:            5
642         - Opcode:          DW_LNS_set_epilogue_begin
643           Data:            0
644         - Opcode:          0x46
645           Data:            0
646         - Opcode:          DW_LNS_advance_pc
647           Data:            8
648         - Opcode:          DW_LNS_extended_op
649           ExtLen:          1
650           SubOpcode:       DW_LNE_end_sequence
651           Data:            0
652     - Length:          74
653       Version:         4
654       PrologueLength:  39
655       MinInstLength:   1
656       MaxOpsPerInst:   1
657       DefaultIsStmt:   1
658       LineBase:        251
659       LineRange:       14
660       OpcodeBase:      13
661       StandardOpcodeLengths: [ 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1 ]
662       IncludeDirs:
663         - out
664       Files:
665         - Name:            file_03.cpp
666           DirIdx:          1
667           ModTime:         0
668           Length:          0
669       Opcodes:
670         - Opcode:          DW_LNS_extended_op
671           ExtLen:          9
672           SubOpcode:       DW_LNE_set_address
673           Data:            584
674         - Opcode:          0x16
675           Data:            0
676         - Opcode:          DW_LNS_set_column
677           Data:            7
678         - Opcode:          DW_LNS_set_prologue_end
679           Data:            0
680         - Opcode:          0xBC
681           Data:            0
682         - Opcode:          0x4C
683           Data:            0
684         - Opcode:          0x49
685           Data:            0
686         - Opcode:          0x4D
687           Data:            0
688         - Opcode:          0x49
689           Data:            0
690         - Opcode:          DW_LNS_set_column
691           Data:            5
692         - Opcode:          DW_LNS_set_epilogue_begin
693           Data:            0
694         - Opcode:          0x46
695           Data:            0
696         - Opcode:          DW_LNS_advance_pc
697           Data:            8
698         - Opcode:          DW_LNS_extended_op
699           ExtLen:          1
700           SubOpcode:       DW_LNE_end_sequence
701           Data:            0
705 ###################################################################################
706 ############################# yaml generation script ##############################
707 # #!/bin/bash
708 # set -ex
709 # # Global variable for LLVM toolchain path
710 # TOOLCHAIN_PATH=[...]
711 # # Switch to the script directory
712 # cd "$(dirname "$0")"
713 # # Create and clean 'out' directory
714 # mkdir -p out
715 # rm -rf out/*
716 # # Generate C++ files
717 # for i in {1..3}; do
718 #     cat << EOF > out/file_0${i}.cpp
719 # extern "C" int my_func_0${i}(
720 #     int a,
721 #     int b)
722 # {
723 #     return
724 #       a
725 #       *
726 #       a
727 #       +
728 #       b;
729 # }
730 # EOF
731 # done
732 # # Compile to object files with debug info
733 # for i in {1..3}; do
734 #     ${TOOLCHAIN_PATH}/bin/clang++  \
735 #     -fno-unwind-tables -fno-asynchronous-unwind-tables  \
736 #     -target arm64-apple-macos -c -g out/file_0${i}.cpp -o out/file_0${i}.o
737 # done
738 # # Link object files to dylib using lld directly
739 # ${TOOLCHAIN_PATH}/bin/ld64.lld \
740 #     -dylib \
741 #     -arch arm64 \
742 #     -platform_version macos 11.0 11.0 \
743 #     -o out/libmyfuncs.dylib \
744 #     --icf=all --keep-icf-stabs \
745 #     -o out/mydylib out/file_01.o out/file_02.o out/file_03.o
746 # # Create dsym with --flat option
747 # "$TOOLCHAIN_PATH/bin/dsymutil" --flat out/mydylib -o out/mydylib.dSYM
748 # # Convert dsym to yaml
749 # "$TOOLCHAIN_PATH/bin/obj2yaml" out/mydylib.dSYM > out/mydylib.yaml
750 ###################################################################################