LLVM: include/llvm/DebugInfo/CodeView/CodeView.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_DEBUGINFO_CODEVIEW_CODEVIEW_H
14#define LLVM_DEBUGINFO_CODEVIEW_CODEVIEW_H
15
16#include
17#include <type_traits>
18
21
22namespace llvm {
23namespace codeview {
24
25
26
28#define TYPE_RECORD(lf_ename, value, name) name = value,
29#include "CodeViewTypes.def"
30};
31
32
33
35#define CV_TYPE(name, val) name = val,
36#include "CodeViewTypes.def"
37};
38
39
40
42#define SYMBOL_RECORD(lf_ename, value, name) name = value,
43#include "CodeViewSymbols.def"
44};
45
46
47
49#define CV_SYMBOL(name, val) name = val,
50#include "CodeViewSymbols.def"
51};
52
53#define CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(Class) \
54 inline Class operator|(Class a, Class b) { \
55 return static_cast(llvm::to_underlying(a) | \
56 llvm::to_underlying(b)); \
57 } \
58 inline Class operator&(Class a, Class b) { \
59 return static_cast(llvm::to_underlying(a) & \
60 llvm::to_underlying(b)); \
61 } \
62 inline Class operator~(Class a) { \
63 return static_cast(~llvm::to_underlying(a)); \
64 } \
65 inline Class &operator|=(Class &a, Class b) { \
66 a = a | b; \
67 return a; \
68 } \
69 inline Class &operator&=(Class &a, Class b) { \
70 a = a & b; \
71 return a; \
72 }
73
74
75
110 SH3 = 0x50,
113 SH4 = 0x53,
127 CEE = 0x90,
131 X64 = 0xd0,
132 EBC = 0xe0,
141};
142
143
144
145
170
171
172
174
175
177};
178
179
180
181
182
183
185 NearC = 0x00,
186 FarC = 0x01,
187 NearPascal = 0x02,
188 FarPascal = 0x03,
189 NearFast = 0x04,
190 FarFast = 0x05,
191 NearStdCall = 0x07,
192 FarStdCall = 0x08,
195 ThisCall = 0x0b,
196 MipsCall = 0x0c,
197 Generic = 0x0d,
199 PpcCall = 0x0f,
200 SHCall = 0x10,
201 ArmCall = 0x11,
202 AM33Call = 0x12,
203 TriCall = 0x13,
204 SH5Call = 0x14,
205 M32RCall = 0x15,
206 ClrCall = 0x16,
208 0x17,
209 NearVector = 0x18,
210 Swift = 0x19,
211};
212
214 None = 0x0000,
227};
229
231 None = 0x00000000,
239 Naked = 0x00000080,
253};
255
261};
263
269};
270
271
277};
278
279
288};
289
290
292 None = 0x0000,
300};
302
303
306 Far = 0x4,
307};
308
309
310
312 None = 0x0000,
316};
318
319
321
332
333
338
340
343};
344
345
347 Near16 = 0x00,
348 Far16 = 0x01,
349 Huge16 = 0x02,
351 BasedOnValue = 0x04,
357 Near32 = 0x0a,
358 Far32 = 0x0b,
359 Near64 = 0x0c
360};
361
362
364 Pointer = 0x00,
369};
370
371
373 None = 0x00000000,
376 Const = 0x00000400,
382};
384
385
387 Unknown = 0x00,
391 GeneralData = 0x04,
396};
397
405 Far = 0x06
406};
407
413};
414
415
429};
431
432
435 Code = 1 << 0,
438 MSIL = 1 << 3,
439};
441
442
453};
455
456
460 EC = 1 << 8,
462 LTCG = 1 << 10,
469};
471
472
476 EC = 1 << 8,
478 LTCG = 1 << 10,
485 Sdl = 1 << 17,
486 PGO = 1 << 18,
487 Exp = 1 << 19,
488};
490
499};
501
502
518};
519
520
526};
527
528
530#define CV_REGISTERS_ALL
531#define CV_REGISTER(name, value) name = value,
532#include "CodeViewRegisters.def"
533#undef CV_REGISTER
534#undef CV_REGISTERS_ALL
535};
536
537
538
542 this->Cpu = Cpu;
543 this->Reg = Reg;
544 }
547};
548
549
550
556};
557
559
561
562
571};
572
574
575
577
581};
582
583
598 };
599};
600
601
602
603
604
605
606
607
611};
612
616
617};
618
620
623 return 1;
624 return 4;
625}
626
627
628
629
630
631
632
633
634
635
648};
649}
650}
651
652#endif
#define CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(Class)
This file contains library features backported from future STL versions.
A table of densely packed, null-terminated strings indexed by offset.
@ ChangeCodeLengthAndCodeOffset
@ ChangeCodeOffsetAndLineOffset
PointerMode
Equivalent to CV_ptrmode_e.
@ PointerToMemberFunction
ProcSymFlags
Corresponds to the CV_PROCFLAGS bitfield.
PointerOptions
Equivalent to misc lfPointerAttr bitfields.
LocalSymFlags
Corresponds to CV_LVARFLAGS bitfield.
MethodKind
Part of member attribute flags. (CV_methodprop_e)
CompileSym2Flags
Corresponds to COMPILESYM2::Flags bitfield.
PointerKind
Equivalent to CV_ptrtype_e.
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn....
CompileSym3Flags
Corresponds to COMPILESYM3::Flags bitfield.
@ HasConstructorOrDestructor
@ HasOverloadedAssignmentOperator
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
@ MultipleInheritanceData
@ SingleInheritanceFunction
@ VirtualInheritanceFunction
@ MultipleInheritanceFunction
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
SymbolRecordKind
Distinguishes individual records in the Symbols subsection of a .debug$S section.
uint32_t alignOf(CodeViewContainer Container)
MethodOptions
Equivalent to CV_fldattr_t bitfield.
@ ConstructorWithVirtualBases
MemberAccess
Source-level access specifier. (CV_access_e)
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
EncodedFramePtrReg
Two-bit value indicating which register is the designated frame pointer register.
RegisterId decodeFramePtrReg(EncodedFramePtrReg EncodedReg, CPUType CPU)
TypeRecordKind
Distinguishes individual records in .debug$T or .debug$P section or PDB type stream.
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
ModifierOptions
Equivalent to CV_modifier_t.
@ ProfileGuidedOptimization
@ NoStackOrderingForSecurityChecks
@ EncodedLocalBasePointerMask
@ AsynchronousExceptionHandling
@ HasStructuredExceptionHandling
@ EncodedParamBasePointerMask
PublicSymFlags
Corresponds to the CV_PUBSYMFLAGS bitfield.
LabelType
Equivalent to CV_LABEL_TYPE_e.
EncodedFramePtrReg encodeFramePtrReg(RegisterId Reg, CPUType CPU)
SourceLanguage
These values correspond to the CV_CFL_LANG enumeration in the Microsoft Debug Interface Access SDK,...
@ D
The DMD compiler emits 'D' for the CV source language.
@ OldSwift
The Swift compiler used to emit 'S' for the CV source language, but current versions emit the enumera...
This is an optimization pass for GlobalISel generic memory operations.
CPURegister(CPUType Cpu, codeview::RegisterId Reg)
support::ulittle32_t Local
support::ulittle32_t Global
support::ulittle32_t Count
support::ulittle32_t ModuleNameOffset
Data in the SUBSEC_FRAMEDATA subection.
support::ulittle16_t PrologSize
support::ulittle32_t ParamsSize
support::ulittle32_t FrameFunc
support::ulittle32_t RvaStart
support::ulittle32_t Flags
support::ulittle32_t LocalSize
support::ulittle32_t CodeSize
support::ulittle16_t SavedRegsSize
support::ulittle32_t MaxStackSize