pdb-framedata.yaml
16.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# // Compile with clang-cl -m32 /Z7 /GS- /c t.obj pdb-framedata.cpp
#
# int func(int x, int y) {
# return x + y;
# }
#
# int main(int argc, char **argv) {
# return func(argc, argc+1);
# }
# RUN: yaml2obj %s -o %t.obj
# RUN: lld-link %t.obj -debug -entry:main -nodefaultlib -debug -out:%t.exe -pdb:%t.pdb
# RUN: llvm-pdbutil dump -fpo %t.pdb | FileCheck %s
# CHECK: New FPO Data
# CHECK-NEXT: ============================================================
# CHECK-NEXT: RVA | Code | Locals | Params | Stack | Prolog | Saved Regs | Has SEH | Has C++EH | Start | Program
# CHECK-NEXT: 00001000 | 31 | 0 | 8 | 0 | 6 | 0 | false | false | false | $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
# CHECK-NEXT: 00001001 | 30 | 0 | 8 | 0 | 5 | 4 | false | false | false | $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
# CHECK-NEXT: 00001003 | 28 | 0 | 8 | 0 | 3 | 4 | false | false | false | $T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
# CHECK-NEXT: 00001020 | 53 | 0 | 8 | 0 | 7 | 0 | false | false | false | $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
# CHECK-NEXT: 00001021 | 52 | 0 | 8 | 0 | 6 | 4 | false | false | false | $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
# CHECK-NEXT: 00001023 | 50 | 0 | 8 | 0 | 4 | 4 | false | false | false | $T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ =
# CHECK-NEXT: 00001024 | 49 | 0 | 8 | 0 | 3 | 8 | false | false | false | $T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $esi $T0 8 - ^ =
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_I386
Characteristics: [ ]
sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 5589E583EC088B450C8B4D088B550803550C8945FC89D0894DF883C4085DC3905589E55683EC148B450C8B4D08C745F8000000008B550883C2018B7508893424895424048945F4894DF0E80000000083C4145E5DC3
Relocations:
- VirtualAddress: 75
SymbolName: '?func@@YAHHH@Z'
Type: IMAGE_REL_I386_REL32
- Name: .data
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
Alignment: 4
SectionData: ''
- Name: .bss
Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
Alignment: 4
SectionData: ''
- Name: .drectve
Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
Alignment: 1
SectionData: 202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 4
Subsections:
- !Symbols
Records:
- Kind: S_COMPILE3
Compile3Sym:
Flags: [ ]
Machine: Pentium3
FrontendMajor: 8
FrontendMinor: 0
FrontendBuild: 0
FrontendQFE: 0
BackendMajor: 8000
BackendMinor: 0
BackendBuild: 0
BackendQFE: 0
Version: 'clang version 8.0.0 '
- !FrameData
Frames:
- CodeSize: 31
FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
LocalSize: 0
MaxStackSize: 0
ParamsSize: 8
PrologSize: 6
RvaStart: 0
SavedRegsSize: 0
- CodeSize: 30
FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
LocalSize: 0
MaxStackSize: 0
ParamsSize: 8
PrologSize: 5
RvaStart: 1
SavedRegsSize: 4
- CodeSize: 28
FrameFunc: '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
LocalSize: 0
MaxStackSize: 0
ParamsSize: 8
PrologSize: 3
RvaStart: 3
SavedRegsSize: 4
- !Symbols
Records:
- Kind: S_GPROC32_ID
ProcSym:
CodeSize: 31
DbgStart: 0
DbgEnd: 0
FunctionType: 4098
Flags: [ ]
DisplayName: func
- Kind: S_LOCAL
LocalSym:
Type: 116
Flags: [ IsParameter ]
VarName: x
- Kind: S_DEFRANGE_REGISTER_REL
DefRangeRegisterRelSym:
Register: 22
Flags: 0
BasePointerOffset: 8
Range:
OffsetStart: 12
ISectStart: 0
Range: 19
Gaps:
- Kind: S_LOCAL
LocalSym:
Type: 116
Flags: [ IsParameter ]
VarName: y
- Kind: S_DEFRANGE_REGISTER_REL
DefRangeRegisterRelSym:
Register: 22
Flags: 0
BasePointerOffset: 12
Range:
OffsetStart: 12
ISectStart: 0
Range: 19
Gaps:
- Kind: S_PROC_ID_END
ScopeEndSym:
- !Lines
CodeSize: 31
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
Blocks:
- FileName: 'D:\src\llvmbuild\cl\Debug\x64\pdb-framedata.cpp'
Lines:
- Offset: 0
LineStart: 3
IsStatement: false
EndDelta: 0
- Offset: 12
LineStart: 4
IsStatement: false
EndDelta: 0
Columns:
- !FrameData
Frames:
- CodeSize: 53
FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
LocalSize: 0
MaxStackSize: 0
ParamsSize: 8
PrologSize: 7
RvaStart: 0
SavedRegsSize: 0
- CodeSize: 52
FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
LocalSize: 0
MaxStackSize: 0
ParamsSize: 8
PrologSize: 6
RvaStart: 1
SavedRegsSize: 4
- CodeSize: 50
FrameFunc: '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
LocalSize: 0
MaxStackSize: 0
ParamsSize: 8
PrologSize: 4
RvaStart: 3
SavedRegsSize: 4
- CodeSize: 49
FrameFunc: '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $esi $T0 8 - ^ = '
LocalSize: 0
MaxStackSize: 0
ParamsSize: 8
PrologSize: 3
RvaStart: 4
SavedRegsSize: 8
- !Symbols
Records:
- Kind: S_GPROC32_ID
ProcSym:
CodeSize: 53
DbgStart: 0
DbgEnd: 0
FunctionType: 4102
Flags: [ ]
DisplayName: main
- Kind: S_LOCAL
LocalSym:
Type: 116
Flags: [ IsParameter ]
VarName: argc
- Kind: S_DEFRANGE_REGISTER_REL
DefRangeRegisterRelSym:
Register: 22
Flags: 0
BasePointerOffset: 8
Range:
OffsetStart: 52
ISectStart: 0
Range: 33
Gaps:
- Kind: S_LOCAL
LocalSym:
Type: 4099
Flags: [ IsParameter ]
VarName: argv
- Kind: S_DEFRANGE_REGISTER_REL
DefRangeRegisterRelSym:
Register: 22
Flags: 0
BasePointerOffset: 12
Range:
OffsetStart: 52
ISectStart: 0
Range: 33
Gaps:
- Kind: S_PROC_ID_END
ScopeEndSym:
- !Lines
CodeSize: 53
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
Blocks:
- FileName: 'D:\src\llvmbuild\cl\Debug\x64\pdb-framedata.cpp'
Lines:
- Offset: 0
LineStart: 7
IsStatement: false
EndDelta: 0
- Offset: 20
LineStart: 8
IsStatement: false
EndDelta: 0
Columns:
- !FileChecksums
Checksums:
- FileName: 'D:\src\llvmbuild\cl\Debug\x64\pdb-framedata.cpp'
Kind: MD5
Checksum: A611B73E19B77B02646FAAF7CAEB025D
- !StringTable
Strings:
- 'D:\src\llvmbuild\cl\Debug\x64\pdb-framedata.cpp'
- '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
- '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
- '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
- '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $esi $T0 8 - ^ = '
- ''
Relocations:
- VirtualAddress: 68
SymbolName: '?func@@YAHHH@Z'
Type: IMAGE_REL_I386_DIR32NB
- VirtualAddress: 208
SymbolName: '?func@@YAHHH@Z'
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 212
SymbolName: '?func@@YAHHH@Z'
Type: IMAGE_REL_I386_SECTION
- VirtualAddress: 244
SymbolName: .text
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 248
SymbolName: .text
Type: IMAGE_REL_I386_SECTION
- VirtualAddress: 276
SymbolName: .text
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 280
SymbolName: .text
Type: IMAGE_REL_I386_SECTION
- VirtualAddress: 296
SymbolName: '?func@@YAHHH@Z'
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 300
SymbolName: '?func@@YAHHH@Z'
Type: IMAGE_REL_I386_SECTION
- VirtualAddress: 344
SymbolName: _main
Type: IMAGE_REL_I386_DIR32NB
- VirtualAddress: 516
SymbolName: _main
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 520
SymbolName: _main
Type: IMAGE_REL_I386_SECTION
- VirtualAddress: 555
SymbolName: .text
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 559
SymbolName: .text
Type: IMAGE_REL_I386_SECTION
- VirtualAddress: 590
SymbolName: .text
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 594
SymbolName: .text
Type: IMAGE_REL_I386_SECTION
- VirtualAddress: 612
SymbolName: _main
Type: IMAGE_REL_I386_SECREL
- VirtualAddress: 616
SymbolName: _main
Type: IMAGE_REL_I386_SECTION
- Name: '.debug$T'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 4
Types:
- Kind: LF_ARGLIST
ArgList:
ArgIndices: [ 116, 116 ]
- Kind: LF_PROCEDURE
Procedure:
ReturnType: 116
CallConv: NearC
Options: [ None ]
ParameterCount: 2
ArgumentList: 4096
- Kind: LF_FUNC_ID
FuncId:
ParentScope: 0
FunctionType: 4097
Name: func
- Kind: LF_POINTER
Pointer:
ReferentType: 1136
Attrs: 32778
- Kind: LF_ARGLIST
ArgList:
ArgIndices: [ 116, 4099 ]
- Kind: LF_PROCEDURE
Procedure:
ReturnType: 116
CallConv: NearC
Options: [ None ]
ParameterCount: 2
ArgumentList: 4100
- Kind: LF_FUNC_ID
FuncId:
ParentScope: 0
FunctionType: 4101
Name: main
- Name: .llvm_addrsig
Characteristics: [ IMAGE_SCN_LNK_REMOVE ]
Alignment: 1
SectionData: 0F
symbols:
- Name: .text
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 85
NumberOfRelocations: 1
NumberOfLinenumbers: 0
CheckSum: 1989857796
Number: 1
- Name: .data
Value: 0
SectionNumber: 2
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 0
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 2
- Name: .bss
Value: 0
SectionNumber: 3
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 0
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 3
- Name: .drectve
Value: 0
SectionNumber: 4
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 48
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 149686238
Number: 4
- Name: '.debug$S'
Value: 0
SectionNumber: 5
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 988
NumberOfRelocations: 18
NumberOfLinenumbers: 0
CheckSum: 2571438511
Number: 5
- Name: '.debug$T'
Value: 0
SectionNumber: 6
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 120
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 3148269371
Number: 6
- Name: .llvm_addrsig
Value: 0
SectionNumber: 7
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 1
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 2428444049
Number: 7
- Name: '@feat.00'
Value: 1
SectionNumber: -1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- Name: '?func@@YAHHH@Z'
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
- Name: _main
Value: 32
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
...