RawConstants.h 3.2 KB

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