#pdb #stream #msf #file-format #read #write #read-write

ms-pdb-msf

Reads Multi-Stream Files, which are used in the Microsoft Program Database (PDB) file format

1 unstable release

new 0.1.0 Feb 1, 2025

#747 in Parser implementations


Used in 2 crates (via ms-pdb)

MIT/Apache

175KB
3K SLoC

Reads and writes Multi-Stream Files (MSF). MSF is the underlying container format used by Program Database (PDB) files.

MSF files contain a set of numbered streams. Each stream is like a file; a stream is a sequence of bytes.

The bytes stored within a single stream are usually not stored sequentially on disk. The organization of the disk file and the mapping from stream locations to MSF file locations is similar to a traditional file system; managing that mapping is the main purpose of the MSF file format.

MSF files are used as the container format for Program Database (PDB) files. PDB files are used by compilers, debuggers, and other tools when targeting Windows.

Most developers should not use this crate directly. This crate is a building block for tools that read and write PDBs. This crate does not provide any means for building or parsing the data structures of PDB files; it only handles storing files in the MSF container format.

The mspdb crate uses this crate for reading and writing PDB files. It provides an interface for reading PDB data structures, and in some cases for creating or modifying them. Most developers should use mspdb instead of using msf directly.

References

  • The MSF File Format
  • The PDB File Format
  • microsoft-pdb repository: Many of the comments in this Rust crate reference C++ source files and header files from this microsoft-pdb repository. If a C++ file is referenced in a comment without more context, such as dbi.h, then check for it in the microsoft-pdb repository.

Dependencies

~3.5MB
~65K SLoC