CVDebugRecord.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- CVDebugRecord.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_OBJECT_CVDEBUGRECORD_H
  14. #define LLVM_OBJECT_CVDEBUGRECORD_H
  15. #include "llvm/Support/Endian.h"
  16. namespace llvm {
  17. namespace OMF {
  18. struct Signature {
  19. enum ID : uint32_t {
  20. PDB70 = 0x53445352, // RSDS
  21. PDB20 = 0x3031424e, // NB10
  22. CV50 = 0x3131424e, // NB11
  23. CV41 = 0x3930424e, // NB09
  24. };
  25. support::ulittle32_t CVSignature;
  26. support::ulittle32_t Offset;
  27. };
  28. }
  29. namespace codeview {
  30. struct PDB70DebugInfo {
  31. support::ulittle32_t CVSignature;
  32. uint8_t Signature[16];
  33. support::ulittle32_t Age;
  34. // char PDBFileName[];
  35. };
  36. struct PDB20DebugInfo {
  37. support::ulittle32_t CVSignature;
  38. support::ulittle32_t Offset;
  39. support::ulittle32_t Signature;
  40. support::ulittle32_t Age;
  41. // char PDBFileName[];
  42. };
  43. union DebugInfo {
  44. struct OMF::Signature Signature;
  45. struct PDB20DebugInfo PDB20;
  46. struct PDB70DebugInfo PDB70;
  47. };
  48. }
  49. }
  50. #endif
  51. #ifdef __GNUC__
  52. #pragma GCC diagnostic pop
  53. #endif