LLVM: llvm::msf Namespace Reference (original) (raw)
| 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 |
| Enumerations | |
|---|---|
| enum class | msf_error_code { unspecified = 1 , insufficient_buffer, not_writable, no_stream, invalid_format, block_in_use, size_overflow_4096, size_overflow_8192, size_overflow_16384, size_overflow_32768, stream_directory_overflow } |
| Functions | |
|---|---|
| LLVM_ABI MSFStreamLayout | getFpmStreamLayout (const MSFLayout &Msf, bool IncludeUnusedFpmData=false, bool AltFpm=false) |
| Determine the layout of the FPM stream, given the MSF layout. | |
| bool | isValidBlockSize (uint32_t Size) |
| uint64_t | getMaxFileSizeFromBlockSize (uint32_t Size) |
| Given the specified block size, returns the maximum possible file 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. | |
| uint32_t | getNumFpmIntervals (const MSFLayout &L, bool IncludeUnusedFpmData=false, bool AltFpm=false) |
| LLVM_ABI Error | validateSuperBlock (const SuperBlock &SB) |
| LLVM_ABI const std::error_category & | MSFErrCategory () |
| std::error_code | make_error_code (msf_error_code E) |
◆ msf_error_code
| Enumerator |
|---|
| unspecified |
| insufficient_buffer |
| not_writable |
| no_stream |
| invalid_format |
| block_in_use |
| size_overflow_4096 |
| size_overflow_8192 |
| size_overflow_16384 |
| size_overflow_32768 |
| stream_directory_overflow |
Definition at line 17 of file MSFError.h.
◆ blockToOffset()
◆ bytesToBlocks()
◆ getFirstUnreservedBlock()
| uint32_t llvm::msf::getFirstUnreservedBlock ( ) | inline |
|---|
◆ getFpmIntervalLength()
◆ getFpmStreamLayout()
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 62 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(), and llvm::pdb::PDBFile::getFpmStreamLayout().
◆ getMaxFileSizeFromBlockSize()
Given the specified block size, returns the maximum possible file size.
Block Size | Max File Size <= 4096 | 4GB 8192 | 8GB 16384 | 16GB 32768 | 32GB Size - the block size of the MSF
Definition at line 112 of file MSFCommon.h.
References Size.
Referenced by llvm::msf::MSFBuilder::commit().
◆ getMinimumBlockCount()
| uint32_t llvm::msf::getMinimumBlockCount ( ) | inline |
|---|
◆ getNumFpmIntervals() [1/2]
◆ getNumFpmIntervals() [2/2]
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 156 of file MSFCommon.h.
References assert(), BlockSize, and llvm::divideCeil().
Referenced by getFpmStreamLayout(), and getNumFpmIntervals().
◆ isValidBlockSize()
◆ make_error_code()
| std::error_code llvm::msf::make_error_code ( msf_error_code E) | inline |
|---|
◆ MSFErrCategory()
| const std::error_category & llvm::msf::MSFErrCategory | ( | ) |
|---|
◆ validateSuperBlock()
Definition at line 19 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, llvm::make_error(), llvm::msf::SuperBlock::NumBlocks, llvm::msf::SuperBlock::NumDirectoryBytes, and llvm::Error::success().
Referenced by llvm::pdb::PDBFile::parseFileHeaders().
◆ Magic
Initial value:
= {'M', 'i', 'c', 'r', 'o', 's', 'o', 'f',
't', ' ', 'C', '/', 'C', '+', '+', ' ',
'M', 'S', 'F', ' ', '7', '.', '0', '0',
'\r', '\n', '\x1a', 'D', 'S', '\0', '\0', '\0'}
Definition at line 24 of file MSFCommon.h.
Referenced by llvm::msf::MSFBuilder::generateLayout(), validatePdbMagic(), and validateSuperBlock().