LLVM
8.0.1
|
Classes | |
class | IMSFFile |
class | MappedBlockStream |
MappedBlockStream represents data stored in an MSF file into chunks of a particular size (called the Block Size), and whose chunks may not be necessarily contiguous. More... | |
class | MSFBuilder |
class | MSFError |
Base class for errors originating when parsing raw PDB files. More... | |
struct | MSFLayout |
class | MSFStreamLayout |
Describes the layout of a stream in an MSF layout. More... | |
struct | SuperBlock |
class | WritableMappedBlockStream |
Functions | |
MSFStreamLayout | getFpmStreamLayout (const MSFLayout &Msf, bool IncludeUnusedFpmData=false, bool AltFpm=false) |
Determine the layout of the FPM stream, given the MSF layout. More... | |
bool | isValidBlockSize (uint32_t Size) |
uint32_t | getMinimumBlockCount () |
uint32_t | getFirstUnreservedBlock () |
uint64_t | bytesToBlocks (uint64_t NumBytes, uint64_t BlockSize) |
uint64_t | blockToOffset (uint64_t BlockNumber, uint64_t BlockSize) |
uint32_t | getFpmIntervalLength (const MSFLayout &L) |
uint32_t | getNumFpmIntervals (uint32_t BlockSize, uint32_t NumBlocks, bool IncludeUnusedFpmData, int FpmNumber) |
Given an MSF with the specified block size and number of blocks, determine how many pieces the specified Fpm is split into. More... | |
uint32_t | getNumFpmIntervals (const MSFLayout &L, bool IncludeUnusedFpmData=false, bool AltFpm=false) |
Error | validateSuperBlock (const SuperBlock &SB) |
const std::error_category & | MSFErrCategory () |
std::error_code | make_error_code (msf_error_code E) |
Variables | |
static const char | Magic [] |
|
strong |
Enumerator | |
---|---|
unspecified | |
insufficient_buffer | |
not_writable | |
no_stream | |
invalid_format | |
block_in_use |
Definition at line 19 of file MSFError.h.
|
inline |
Definition at line 113 of file MSFCommon.h.
References llvm::msf::SuperBlock::BlockSize.
Referenced by llvm::pdb::PDBFileBuilder::commit(), llvm::msf::MSFBuilder::commit(), llvm::pdb::PDBFile::getBlockData(), llvm::msf::MappedBlockStream::getLength(), llvm::msf::MappedBlockStream::readLongestContiguousChunk(), and llvm::msf::WritableMappedBlockStream::writeBytes().
|
inline |
Definition at line 109 of file MSFCommon.h.
References llvm::divideCeil().
Referenced by llvm::msf::MSFBuilder::addStream(), llvm::msf::MSFBuilder::generateLayout(), llvm::pdb::PDBFile::getNumDirectoryBlocks(), llvm::msf::MSFBuilder::getStreamBlocks(), llvm::pdb::PDBFile::parseStreamData(), llvm::msf::MSFBuilder::setStreamSize(), and validateSuperBlock().
|
inline |
Definition at line 107 of file MSFCommon.h.
Definition at line 117 of file MSFCommon.h.
References llvm::msf::SuperBlock::BlockSize, and llvm::msf::MSFLayout::SB.
Referenced by getFpmStreamLayout().
MSFStreamLayout llvm::msf::getFpmStreamLayout | ( | const MSFLayout & | Msf, |
bool | IncludeUnusedFpmData = false , |
||
bool | AltFpm = false |
||
) |
Determine the layout of the FPM stream, given the MSF layout.
An FPM stream spans 1 or more blocks, each at equally spaced intervals throughout the file.
Definition at line 63 of file MSFCommon.cpp.
References llvm::msf::MSFLayout::alternateFpmBlock(), llvm::msf::MSFStreamLayout::Blocks, llvm::msf::SuperBlock::BlockSize, llvm::divideCeil(), getFpmIntervalLength(), getNumFpmIntervals(), I, llvm::msf::MSFStreamLayout::Length, llvm::msf::MSFLayout::mainFpmBlock(), llvm::msf::SuperBlock::NumBlocks, and llvm::msf::MSFLayout::SB.
Referenced by llvm::msf::MappedBlockStream::createFpmStream(), llvm::msf::WritableMappedBlockStream::createFpmStream(), llvm::pdb::PDBFile::getFpmStreamLayout(), and llvm::pdb::PDBFile::getMsfBuffer().
|
inline |
Definition at line 103 of file MSFCommon.h.
Referenced by llvm::msf::MSFBuilder::create().
|
inline |
Given an MSF with the specified block size and number of blocks, determine how many pieces the specified Fpm is split into.
BlockSize
- the block size of the MSF NumBlocks
- the total number of blocks in the MSF IncludeUnusedFpmData
- When true, this will count every block that is both in the file and matches the form of an FPM block, even if some of those FPM blocks are unused (a single FPM block can describe the allocation status of up to 32,767 blocks, although one appears only every 4,096 blocks). So there are 8x as many blocks that match the form as there are blocks that are necessary to describe the allocation status of the file. When this parameter is false, these extraneous trailing blocks are not counted.
Definition at line 133 of file MSFCommon.h.
References assert(), and llvm::divideCeil().
Referenced by getFpmStreamLayout(), and getNumFpmIntervals().
|
inline |
Definition at line 149 of file MSFCommon.h.
References llvm::msf::MSFLayout::alternateFpmBlock(), llvm::msf::SuperBlock::BlockSize, getNumFpmIntervals(), llvm::msf::MSFLayout::mainFpmBlock(), llvm::msf::SuperBlock::NumBlocks, llvm::msf::MSFLayout::SB, and validateSuperBlock().
Definition at line 91 of file MSFCommon.h.
Referenced by llvm::msf::MSFBuilder::create(), and validateSuperBlock().
|
inline |
Definition at line 39 of file MSFError.h.
References MSFErrCategory().
const std::error_category & llvm::msf::MSFErrCategory | ( | ) |
Definition at line 44 of file MSFError.cpp.
References llvm::msf::MSFError::ID, and MSFCategory.
Referenced by make_error_code().
Error llvm::msf::validateSuperBlock | ( | const SuperBlock & | SB | ) |
Definition at line 20 of file MSFCommon.cpp.
References llvm::msf::SuperBlock::BlockMapAddr, llvm::msf::SuperBlock::BlockSize, bytesToBlocks(), llvm::msf::SuperBlock::FreeBlockMapBlock, invalid_format, isValidBlockSize(), Magic, llvm::msf::SuperBlock::MagicBytes, memcmp, llvm::msf::SuperBlock::NumBlocks, llvm::msf::SuperBlock::NumDirectoryBytes, and llvm::Error::success().
Referenced by getNumFpmIntervals(), and llvm::pdb::PDBFile::parseFileHeaders().
Definition at line 24 of file MSFCommon.h.
Referenced by llvm::msf::MSFBuilder::generateLayout(), and validateSuperBlock().