Home | History | Annotate | Download | only in Native
      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 
     16 #include <cstdint>
     17 
     18 namespace llvm {
     19 namespace pdb {
     20 
     21 const uint16_t kInvalidStreamIndex = 0xFFFF;
     22 
     23 enum PdbRaw_ImplVer : uint32_t {
     24   PdbImplVC2 = 19941610,
     25   PdbImplVC4 = 19950623,
     26   PdbImplVC41 = 19950814,
     27   PdbImplVC50 = 19960307,
     28   PdbImplVC98 = 19970604,
     29   PdbImplVC70Dep = 19990604, // deprecated
     30   PdbImplVC70 = 20000404,
     31   PdbImplVC80 = 20030901,
     32   PdbImplVC110 = 20091201,
     33   PdbImplVC140 = 20140508,
     34 };
     35 
     36 enum class PdbRaw_FeatureSig : uint32_t {
     37   VC110 = PdbImplVC110,
     38   VC140 = PdbImplVC140,
     39   NoTypeMerge = 0x4D544F4E,
     40   MinimalDebugInfo = 0x494E494D,
     41 };
     42 
     43 enum PdbRaw_Features : uint32_t {
     44   PdbFeatureNone = 0x0,
     45   PdbFeatureContainsIdStream = 0x1,
     46   PdbFeatureMinimalDebugInfo = 0x2,
     47   PdbFeatureNoTypeMerging = 0x4,
     48   LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ PdbFeatureNoTypeMerging)
     49 };
     50 
     51 enum PdbRaw_DbiVer : uint32_t {
     52   PdbDbiVC41 = 930803,
     53   PdbDbiV50 = 19960307,
     54   PdbDbiV60 = 19970606,
     55   PdbDbiV70 = 19990903,
     56   PdbDbiV110 = 20091201
     57 };
     58 
     59 enum PdbRaw_TpiVer : uint32_t {
     60   PdbTpiV40 = 19950410,
     61   PdbTpiV41 = 19951122,
     62   PdbTpiV50 = 19961031,
     63   PdbTpiV70 = 19990903,
     64   PdbTpiV80 = 20040203,
     65 };
     66 
     67 enum PdbRaw_DbiSecContribVer : uint32_t {
     68   DbiSecContribVer60 = 0xeffe0000 + 19970605,
     69   DbiSecContribV2 = 0xeffe0000 + 20140516
     70 };
     71 
     72 enum SpecialStream : uint32_t {
     73   // Stream 0 contains the copy of previous version of the MSF directory.
     74   // We are not currently using it, but technically if we find the main
     75   // MSF is corrupted, we could fallback to it.
     76   OldMSFDirectory = 0,
     77 
     78   StreamPDB = 1,
     79   StreamTPI = 2,
     80   StreamDBI = 3,
     81   StreamIPI = 4,
     82 
     83   kSpecialStreamCount
     84 };
     85 
     86 enum class DbgHeaderType : uint16_t {
     87   FPO,
     88   Exception,
     89   Fixup,
     90   OmapToSrc,
     91   OmapFromSrc,
     92   SectionHdr,
     93   TokenRidMap,
     94   Xdata,
     95   Pdata,
     96   NewFPO,
     97   SectionHdrOrig,
     98   Max
     99 };
    100 
    101 enum class OMFSegDescFlags : uint16_t {
    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 };
    110 
    111 } // end namespace pdb
    112 } // end namespace llvm
    113 
    114 #endif // LLVM_DEBUGINFO_PDB_RAW_PDBRAWCONSTANTS_H
    115