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 17namespace llvm { 18namespace pdb { 19 20const uint16_t kInvalidStreamIndex = 0xFFFF; 21 22enum 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 35enum class PdbRaw_FeatureSig : uint32_t { 36 VC110 = PdbImplVC110, 37 VC140 = PdbImplVC140, 38 NoTypeMerge = 0x4D544F4E, 39 MinimalDebugInfo = 0x494E494D, 40}; 41 42enum PdbRaw_Features : uint32_t { 43 PdbFeatureNone = 0x0, 44 PdbFeatureContainsIdStream = 0x1, 45 PdbFeatureMinimalDebugInfo = 0x2, 46 PdbFeatureNoTypeMerging = 0x4, 47 LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ PdbFeatureNoTypeMerging) 48}; 49 50enum PdbRaw_DbiVer : uint32_t { 51 PdbDbiVC41 = 930803, 52 PdbDbiV50 = 19960307, 53 PdbDbiV60 = 19970606, 54 PdbDbiV70 = 19990903, 55 PdbDbiV110 = 20091201 56}; 57 58enum PdbRaw_TpiVer : uint32_t { 59 PdbTpiV40 = 19950410, 60 PdbTpiV41 = 19951122, 61 PdbTpiV50 = 19961031, 62 PdbTpiV70 = 19990903, 63 PdbTpiV80 = 20040203, 64}; 65 66enum PdbRaw_DbiSecContribVer : uint32_t { 67 DbiSecContribVer60 = 0xeffe0000 + 19970605, 68 DbiSecContribV2 = 0xeffe0000 + 20140516 69}; 70 71enum SpecialStream : uint32_t { 72 // Stream 0 contains the copy of previous version of the MSF directory. 73 // We are not currently using it, but technically if we find the main 74 // MSF is corrupted, we could fallback to it. 75 OldMSFDirectory = 0, 76 77 StreamPDB = 1, 78 StreamTPI = 2, 79 StreamDBI = 3, 80 StreamIPI = 4, 81 82 kSpecialStreamCount 83}; 84 85enum class DbgHeaderType : uint16_t { 86 FPO, 87 Exception, 88 Fixup, 89 OmapToSrc, 90 OmapFromSrc, 91 SectionHdr, 92 TokenRidMap, 93 Xdata, 94 Pdata, 95 NewFPO, 96 SectionHdrOrig, 97 Max 98}; 99 100enum class OMFSegDescFlags : uint16_t { 101 None = 0, 102 Read = 1 << 0, // Segment is readable. 103 Write = 1 << 1, // Segment is writable. 104 Execute = 1 << 2, // Segment is executable. 105 AddressIs32Bit = 1 << 3, // Descriptor describes a 32-bit linear address. 106 IsSelector = 1 << 8, // Frame represents a selector. 107 IsAbsoluteAddress = 1 << 9, // Frame represents an absolute address. 108 IsGroup = 1 << 10, // If set, descriptor represents a group. 109 LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ IsGroup) 110}; 111 112LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); 113 114} // end namespace pdb 115} // end namespace llvm 116 117#endif // LLVM_DEBUGINFO_PDB_RAW_PDBRAWCONSTANTS_H 118