llvm.org GIT mirror llvm / release_70 docs / PDB / ModiStream.rst

Tree @release_70 (Download .tar.gz)

ModiStream.rst @release_70view markup · raw · history · blame

The Module Information Stream


The Module Info Stream (henceforth referred to as the Modi stream) contains information about a single module (object file, import library, etc that contributes to the binary this PDB contains debug information about. There is one modi stream for each module, and the mapping between modi stream index and module is contained in the :doc:`DBI Stream <DbiStream>`. The modi stream for a single module contains line information for the compiland, as well as all CodeView information for the symbols defined in the compiland. Finally, there is a "global refs" substream which is not well understood.

Stream Layout

A modi stream is laid out as follows:

struct ModiStream {
  uint32_t Signature;
  uint8_t Symbols[SymbolSize-4];
  uint8_t C11LineInfo[C11Size];
  uint8_t C13LineInfo[C13Size];

  uint32_t GlobalRefsSize;
  uint8_t GlobalRefs[GlobalRefsSize];

The CodeView Symbol Substream

The CodeView Symbol Substream. This is an array of variable length records describing the functions, variables, inlining information, and other symbols defined in the compiland. The entire array consumes SymbolSize-4 bytes. The format of a CodeView Symbol Record (and thusly, an array of CodeView Symbol Records) is described in :doc:`CodeViewSymbols`.