PublicsStream.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- PublicsStream.h - PDB Public Symbol Stream -------- ------*- 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_PUBLICSSTREAM_H
  14. #define LLVM_DEBUGINFO_PDB_NATIVE_PUBLICSSTREAM_H
  15. #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
  16. #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
  17. #include "llvm/DebugInfo/PDB/Native/GlobalsStream.h"
  18. #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
  19. #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
  20. #include "llvm/DebugInfo/PDB/PDBTypes.h"
  21. #include "llvm/Support/BinaryStreamArray.h"
  22. #include "llvm/Support/Error.h"
  23. namespace llvm {
  24. namespace pdb {
  25. class DbiStream;
  26. struct GSIHashHeader;
  27. class PDBFile;
  28. class PublicsStream {
  29. public:
  30. PublicsStream(std::unique_ptr<msf::MappedBlockStream> Stream);
  31. ~PublicsStream();
  32. Error reload();
  33. uint32_t getSymHash() const;
  34. uint16_t getThunkTableSection() const;
  35. uint32_t getThunkTableOffset() const;
  36. const GSIHashTable &getPublicsTable() const { return PublicsTable; }
  37. FixedStreamArray<support::ulittle32_t> getAddressMap() const {
  38. return AddressMap;
  39. }
  40. FixedStreamArray<support::ulittle32_t> getThunkMap() const {
  41. return ThunkMap;
  42. }
  43. FixedStreamArray<SectionOffset> getSectionOffsets() const {
  44. return SectionOffsets;
  45. }
  46. private:
  47. std::unique_ptr<msf::MappedBlockStream> Stream;
  48. GSIHashTable PublicsTable;
  49. FixedStreamArray<support::ulittle32_t> AddressMap;
  50. FixedStreamArray<support::ulittle32_t> ThunkMap;
  51. FixedStreamArray<SectionOffset> SectionOffsets;
  52. const PublicsStreamHeader *Header;
  53. };
  54. }
  55. }
  56. #endif
  57. #ifdef __GNUC__
  58. #pragma GCC diagnostic pop
  59. #endif