• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- RawConstants.h -------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBRAWCONSTANTS_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBRAWCONSTANTS_H
12 
13 #include "llvm/ADT/BitmaskEnum.h"
14 #include "llvm/DebugInfo/CodeView/CodeView.h"
15 #include <cstdint>
16 
17 namespace llvm {
18 namespace pdb {
19 
20 const uint16_t kInvalidStreamIndex = 0xFFFF;
21 
22 enum PdbRaw_ImplVer : uint32_t {
23   PdbImplVC2 = 19941610,
24   PdbImplVC4 = 19950623,
25   PdbImplVC41 = 19950814,
26   PdbImplVC50 = 19960307,
27   PdbImplVC98 = 19970604,
28   PdbImplVC70Dep = 19990604, // deprecated
29   PdbImplVC70 = 20000404,
30   PdbImplVC80 = 20030901,
31   PdbImplVC110 = 20091201,
32   PdbImplVC140 = 20140508,
33 };
34 
35 enum class PdbRaw_SrcHeaderBlockVer : uint32_t { SrcVerOne = 19980827 };
36 
37 enum class PdbRaw_FeatureSig : uint32_t {
38   VC110 = PdbImplVC110,
39   VC140 = PdbImplVC140,
40   NoTypeMerge = 0x4D544F4E,
41   MinimalDebugInfo = 0x494E494D,
42 };
43 
44 enum PdbRaw_Features : uint32_t {
45   PdbFeatureNone = 0x0,
46   PdbFeatureContainsIdStream = 0x1,
47   PdbFeatureMinimalDebugInfo = 0x2,
48   PdbFeatureNoTypeMerging = 0x4,
49   LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ PdbFeatureNoTypeMerging)
50 };
51 
52 enum PdbRaw_DbiVer : uint32_t {
53   PdbDbiVC41 = 930803,
54   PdbDbiV50 = 19960307,
55   PdbDbiV60 = 19970606,
56   PdbDbiV70 = 19990903,
57   PdbDbiV110 = 20091201
58 };
59 
60 enum PdbRaw_TpiVer : uint32_t {
61   PdbTpiV40 = 19950410,
62   PdbTpiV41 = 19951122,
63   PdbTpiV50 = 19961031,
64   PdbTpiV70 = 19990903,
65   PdbTpiV80 = 20040203,
66 };
67 
68 enum PdbRaw_DbiSecContribVer : uint32_t {
69   DbiSecContribVer60 = 0xeffe0000 + 19970605,
70   DbiSecContribV2 = 0xeffe0000 + 20140516
71 };
72 
73 enum SpecialStream : uint32_t {
74   // Stream 0 contains the copy of previous version of the MSF directory.
75   // We are not currently using it, but technically if we find the main
76   // MSF is corrupted, we could fallback to it.
77   OldMSFDirectory = 0,
78 
79   StreamPDB = 1,
80   StreamTPI = 2,
81   StreamDBI = 3,
82   StreamIPI = 4,
83 
84   kSpecialStreamCount
85 };
86 
87 enum class DbgHeaderType : uint16_t {
88   FPO,
89   Exception,
90   Fixup,
91   OmapToSrc,
92   OmapFromSrc,
93   SectionHdr,
94   TokenRidMap,
95   Xdata,
96   Pdata,
97   NewFPO,
98   SectionHdrOrig,
99   Max
100 };
101 
102 enum class OMFSegDescFlags : uint16_t {
103   None = 0,
104   Read = 1 << 0,              // Segment is readable.
105   Write = 1 << 1,             // Segment is writable.
106   Execute = 1 << 2,           // Segment is executable.
107   AddressIs32Bit = 1 << 3,    // Descriptor describes a 32-bit linear address.
108   IsSelector = 1 << 8,        // Frame represents a selector.
109   IsAbsoluteAddress = 1 << 9, // Frame represents an absolute address.
110   IsGroup = 1 << 10,          // If set, descriptor represents a group.
111   LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ IsGroup)
112 };
113 
114 LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
115 
116 } // end namespace pdb
117 } // end namespace llvm
118 
119 #endif // LLVM_DEBUGINFO_PDB_RAW_PDBRAWCONSTANTS_H
120