LLVM  5.0.0
Public Member Functions | List of all members
llvm::pdb::PDBFile Class Reference

#include "llvm/DebugInfo/PDB/Native/PDBFile.h"

Inheritance diagram for llvm::pdb::PDBFile:
[legend]
Collaboration diagram for llvm::pdb::PDBFile:
[legend]

Public Member Functions

 PDBFile (StringRef Path, std::unique_ptr< BinaryStream > PdbFileBuffer, BumpPtrAllocator &Allocator)
 
 ~PDBFile () override
 
StringRef getFileDirectory () const
 
StringRef getFilePath () const
 
uint32_t getFreeBlockMapBlock () const
 
uint32_t getUnknown1 () const
 
uint32_t getBlockSize () const override
 
uint32_t getBlockCount () const override
 
uint32_t getNumDirectoryBytes () const
 
uint32_t getBlockMapIndex () const
 
uint32_t getNumDirectoryBlocks () const
 
uint64_t getBlockMapOffset () const
 
uint32_t getNumStreams () const override
 
uint32_t getStreamByteSize (uint32_t StreamIndex) const override
 
ArrayRef< support::ulittle32_t > getStreamBlockList (uint32_t StreamIndex) const override
 
uint32_t getFileSize () const
 
Expected< ArrayRef< uint8_t > > getBlockData (uint32_t BlockIndex, uint32_t NumBytes) const override
 
Error setBlockData (uint32_t BlockIndex, uint32_t Offset, ArrayRef< uint8_t > Data) const override
 
ArrayRef< uint32_t > getFpmPages () const
 
ArrayRef< support::ulittle32_t > getStreamSizes () const
 
ArrayRef< ArrayRef
< support::ulittle32_t > > 
getStreamMap () const
 
const msf::MSFLayout & getMsfLayout () const
 
BinaryStreamRef getMsfBuffer () const
 
ArrayRef< support::ulittle32_t > getDirectoryBlockArray () const
 
msf::MSFStreamLayout getStreamLayout (uint32_t StreamIdx) const
 
Error parseFileHeaders ()
 
Error parseStreamData ()
 
Expected< InfoStream & > getPDBInfoStream ()
 
Expected< DbiStream & > getPDBDbiStream ()
 
Expected< GlobalsStream & > getPDBGlobalsStream ()
 
Expected< TpiStream & > getPDBTpiStream ()
 
Expected< TpiStream & > getPDBIpiStream ()
 
Expected< PublicsStream & > getPDBPublicsStream ()
 
Expected< SymbolStream & > getPDBSymbolStream ()
 
Expected< PDBStringTable & > getStringTable ()
 
BumpPtrAllocator & getAllocator ()
 
bool hasPDBDbiStream () const
 
bool hasPDBGlobalsStream ()
 
bool hasPDBInfoStream ()
 
bool hasPDBIpiStream () const
 
bool hasPDBPublicsStream ()
 
bool hasPDBSymbolStream ()
 
bool hasPDBTpiStream () const
 
bool hasPDBStringTable ()
 
uint32_t getPointerSize ()
 
- Public Member Functions inherited from llvm::msf::IMSFFile
virtual ~IMSFFile ()=default
 

Detailed Description

Definition at line 43 of file PDBFile.h.

Constructor & Destructor Documentation

PDBFile::PDBFile ( StringRef  Path,
std::unique_ptr< BinaryStream >  PdbFileBuffer,
BumpPtrAllocator &  Allocator 
)

Definition at line 42 of file PDBFile.cpp.

PDBFile::~PDBFile ( )
overridedefault

Member Function Documentation

BumpPtrAllocator& llvm::pdb::PDBFile::getAllocator ( )
inline

Definition at line 103 of file PDBFile.h.

Referenced by llvm::pdb::TpiStream::reload().

uint32_t PDBFile::getBlockCount ( ) const
overridevirtual

Implements llvm::msf::IMSFFile.

Definition at line 60 of file PDBFile.cpp.

References llvm::msf::SuperBlock::NumBlocks, and llvm::msf::MSFLayout::SB.

Referenced by parseFileHeaders().

Expected< ArrayRef< uint8_t > > PDBFile::getBlockData ( uint32_t  BlockIndex,
uint32_t  NumBytes 
) const
overridevirtual

Implements llvm::msf::IMSFFile.

Definition at line 99 of file PDBFile.cpp.

References llvm::msf::blockToOffset(), llvm::codeview::EC, and getBlockSize().

uint32_t PDBFile::getBlockMapIndex ( ) const

Definition at line 68 of file PDBFile.cpp.

References llvm::msf::SuperBlock::BlockMapAddr, and llvm::msf::MSFLayout::SB.

uint64_t PDBFile::getBlockMapOffset ( ) const
uint32_t PDBFile::getBlockSize ( ) const
overridevirtual

Implements llvm::msf::IMSFFile.

Definition at line 54 of file PDBFile.cpp.

References llvm::msf::SuperBlock::BlockSize, and llvm::msf::MSFLayout::SB.

Referenced by getBlockData().

ArrayRef< support::ulittle32_t > PDBFile::getDirectoryBlockArray ( ) const

Definition at line 229 of file PDBFile.cpp.

References llvm::msf::MSFLayout::DirectoryBlocks.

StringRef PDBFile::getFileDirectory ( ) const

Definition at line 50 of file PDBFile.cpp.

References llvm::sys::path::parent_path().

StringRef PDBFile::getFilePath ( ) const

Definition at line 48 of file PDBFile.cpp.

Referenced by llvm::pdb::NativeExeSymbol::getSymbolsFileName().

uint32_t PDBFile::getFileSize ( ) const

Definition at line 97 of file PDBFile.cpp.

Referenced by parseStreamData().

ArrayRef<uint32_t> llvm::pdb::PDBFile::getFpmPages ( ) const
inline

Definition at line 75 of file PDBFile.h.

uint32_t PDBFile::getFreeBlockMapBlock ( ) const
BinaryStreamRef llvm::pdb::PDBFile::getMsfBuffer ( ) const
inline

Definition at line 85 of file PDBFile.h.

Referenced by llvm::pdb::TpiStream::reload().

const msf::MSFLayout& llvm::pdb::PDBFile::getMsfLayout ( ) const
inline

Definition at line 84 of file PDBFile.h.

Referenced by llvm::pdb::TpiStream::reload().

uint32_t PDBFile::getNumDirectoryBlocks ( ) const
uint32_t PDBFile::getNumDirectoryBytes ( ) const
uint32_t PDBFile::getNumStreams ( ) const
overridevirtual
Expected< DbiStream & > PDBFile::getPDBDbiStream ( )
Expected< GlobalsStream & > PDBFile::getPDBGlobalsStream ( )

Definition at line 241 of file PDBFile.cpp.

References llvm::codeview::EC, and getPDBDbiStream().

Expected< InfoStream & > PDBFile::getPDBInfoStream ( )
Expected< TpiStream & > PDBFile::getPDBIpiStream ( )

Definition at line 298 of file PDBFile.cpp.

References llvm::codeview::EC, and llvm::pdb::StreamIPI.

Expected< PublicsStream & > PDBFile::getPDBPublicsStream ( )

Definition at line 311 of file PDBFile.cpp.

References llvm::codeview::EC, and getPDBDbiStream().

Expected< SymbolStream & > PDBFile::getPDBSymbolStream ( )
Expected< TpiStream & > PDBFile::getPDBTpiStream ( )

Definition at line 285 of file PDBFile.cpp.

References llvm::codeview::EC, and llvm::pdb::StreamTPI.

uint32_t PDBFile::getPointerSize ( )

Definition at line 374 of file PDBFile.cpp.

References llvm::pdb::Amd64, getPDBDbiStream(), and Machine.

ArrayRef< support::ulittle32_t > PDBFile::getStreamBlockList ( uint32_t  StreamIndex) const
overridevirtual

Implements llvm::msf::IMSFFile.

Definition at line 93 of file PDBFile.cpp.

References llvm::msf::MSFLayout::StreamMap.

Referenced by getStreamLayout().

uint32_t PDBFile::getStreamByteSize ( uint32_t  StreamIndex) const
overridevirtual

Implements llvm::msf::IMSFFile.

Definition at line 88 of file PDBFile.cpp.

References llvm::msf::MSFLayout::StreamSizes.

Referenced by getStreamLayout(), and parseStreamData().

MSFStreamLayout PDBFile::getStreamLayout ( uint32_t  StreamIdx) const
ArrayRef<ArrayRef<support::ulittle32_t> > llvm::pdb::PDBFile::getStreamMap ( ) const
inline

Definition at line 80 of file PDBFile.h.

References llvm::msf::MSFLayout::StreamMap.

ArrayRef<support::ulittle32_t> llvm::pdb::PDBFile::getStreamSizes ( ) const
inline

Definition at line 77 of file PDBFile.h.

References llvm::msf::MSFLayout::StreamSizes.

Expected< PDBStringTable & > PDBFile::getStringTable ( )

Definition at line 350 of file PDBFile.cpp.

References assert(), llvm::codeview::EC, getPDBInfoStream(), and N.

uint32_t PDBFile::getUnknown1 ( ) const

Definition at line 72 of file PDBFile.cpp.

References llvm::msf::MSFLayout::SB, and llvm::msf::SuperBlock::Unknown1.

bool PDBFile::hasPDBDbiStream ( ) const

Definition at line 384 of file PDBFile.cpp.

References getNumStreams(), and llvm::pdb::StreamDBI.

bool PDBFile::hasPDBGlobalsStream ( )

Definition at line 386 of file PDBFile.cpp.

References llvm::consumeError(), getNumStreams(), and getPDBDbiStream().

bool PDBFile::hasPDBInfoStream ( )

Definition at line 396 of file PDBFile.cpp.

References getNumStreams(), and llvm::pdb::StreamPDB.

bool PDBFile::hasPDBIpiStream ( ) const

Definition at line 398 of file PDBFile.cpp.

References getNumStreams(), and llvm::pdb::StreamIPI.

bool PDBFile::hasPDBPublicsStream ( )

Definition at line 400 of file PDBFile.cpp.

References llvm::consumeError(), getNumStreams(), and getPDBDbiStream().

bool PDBFile::hasPDBStringTable ( )

Definition at line 418 of file PDBFile.cpp.

References getNumStreams(), and getPDBInfoStream().

bool PDBFile::hasPDBSymbolStream ( )

Definition at line 409 of file PDBFile.cpp.

References getNumStreams(), and getPDBDbiStream().

bool PDBFile::hasPDBTpiStream ( ) const

Definition at line 416 of file PDBFile.cpp.

References getNumStreams(), and llvm::pdb::StreamTPI.

Error PDBFile::parseFileHeaders ( )
Error PDBFile::parseStreamData ( )
Error PDBFile::setBlockData ( uint32_t  BlockIndex,
uint32_t  Offset,
ArrayRef< uint8_t >  Data 
) const
overridevirtual

Implements llvm::msf::IMSFFile.

Definition at line 109 of file PDBFile.cpp.

References llvm::pdb::not_writable.


The documentation for this class was generated from the following files: