1 //===- PublicsStream.h - PDB Public Symbol Stream -------- ------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_DEBUGINFO_PDB_RAW_PUBLICSSTREAM_H 10 #define LLVM_DEBUGINFO_PDB_RAW_PUBLICSSTREAM_H 11 12 #include "llvm/DebugInfo/CodeView/SymbolRecord.h" 13 #include "llvm/DebugInfo/MSF/MappedBlockStream.h" 14 #include "llvm/DebugInfo/PDB/Native/GlobalsStream.h" 15 #include "llvm/DebugInfo/PDB/Native/RawConstants.h" 16 #include "llvm/DebugInfo/PDB/Native/RawTypes.h" 17 #include "llvm/DebugInfo/PDB/PDBTypes.h" 18 #include "llvm/Support/BinaryStreamArray.h" 19 #include "llvm/Support/Error.h" 20 21 namespace llvm { 22 namespace pdb { 23 class DbiStream; 24 struct GSIHashHeader; 25 class PDBFile; 26 27 class PublicsStream { 28 public: 29 PublicsStream(std::unique_ptr<msf::MappedBlockStream> Stream); 30 ~PublicsStream(); 31 Error reload(); 32 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 47 private: 48 std::unique_ptr<msf::MappedBlockStream> Stream; 49 GSIHashTable PublicsTable; 50 FixedStreamArray<support::ulittle32_t> AddressMap; 51 FixedStreamArray<support::ulittle32_t> ThunkMap; 52 FixedStreamArray<SectionOffset> SectionOffsets; 53 54 const PublicsStreamHeader *Header; 55 }; 56 } 57 } 58 59 #endif 60