LLVM-PDBUTIL(1)
π NAME
Okay bestie, welcome to llvm-pdbutil β the LLVM manual page for PDB File forensics and diagnostics. It's giving "I investigate PDB files for fun and also I can manipulate and create them." Iconic.
Here's the table of contents, because organization is very main character energy:
- Synopsis
- Description
- Subcommands
- pretty
- Summary
- Options
- Filtering and Sorting Options
- Symbol Type Options
- Other Options
- dump
- Summary
- Options
- MSF Container Options
- Module & File Options
- Symbol Options
- Type Record Options
- Miscellaneous Options
- bytes
- Summary
- Options
- MSF File Options
- PDB Stream Options
- DBI Stream Options
- Module Options
- Type Record Options
- pdb2yaml
- Summary
- Options
- yaml2pdb
- Summary
- Options
- merge
- Summary
- Options
- pretty
π SYNOPSIS
llvm-pdbutil [subcommand] [options]
πΈ DESCRIPTION
This tool displays types, symbols, CodeView records, and other info from a PDB file, and it can also manipulate and create PDB files. No cap.
llvm-pdbutil is normally used by FileCheck-based tests to test LLVM's PDB reading and writing functionality, but it can also be used for general PDB file investigation and forensics, or as a replacement for cvdump. So it's basically the multitasking bestie of PDB tooling. π
π§ SUBCOMMANDS
llvm-pdbutil is separated into several subcommands, each tailored to a different purpose. A brief summary of each command follows, with more detail in the sections that follow. Slay.
prettyβ Dump symbol and type information in a format that tries to look as much like the original source code as possible.dumpβ Dump low level types and structures from the PDB file, including CodeView records, hash tables, PDB streams, etc.bytesβ Dump data from the PDB file's streams, records, types, symbols, etc as raw bytes.yaml2pdbβ Given a yaml description of a PDB file, produce a valid PDB file that matches that description.pdb2yamlβ For a given PDB file, produce a YAML description of some or all of the file in a way that the PDB can be reconstructed.mergeβ Given two PDBs, produce a third PDB that is the result of merging the two input PDBs.
π pretty
IMPORTANT: The pretty subcommand is built on the Windows DIA SDK, and as such is not supported on non-Windows platforms. Bestie, it's Windows-only. Don't try to make it happen on Linux, okay? π
USAGE: llvm-pdbutil pretty [options] <input PDB file>
Summary
The pretty subcommand displays a very high level representation of your program's debug info. Since it is built on the Windows DIA SDK, which is the standard API that Windows tools and debuggers query debug information, it presents a more authoritative view of how a debugger is going to interpret your debug information than a mode which displays low-level CodeView records. It's giving "debugger's point of view" realness. π
Options
Filtering and Sorting Options
NOTE:excludefilters take priority overincludefilters. So if a filter matches both an include and an exclude rule, then it is excluded. Those are the rules, bestie.
-exclude-compilands=<string>β When dumping compilands, compiland source-file contributions, or per-compiland symbols, this option instructsllvm-pdbutilto omit any compilands that match the specified regular expression.-exclude-symbols=<string>β When dumping global, public, or per-compiland symbols, this option instructsllvm-pdbutilto omit any symbols that match the specified regular expression.-exclude-types=<string>β When dumping types, this option instructsllvm-pdbutilto omit any types that match the specified regular expression.-include-compilands=<string>β When dumping compilands, compiland source-file contributions, or per-compiland symbols, limit the initial search to only those compilands that match the specified regular expression.-include-symbols=<string>β When dumping global, public, or per-compiland symbols, limit the initial search to only those symbols that match the specified regular expression.-include-types=<string>β When dumping types, limit the initial search to only those types that match the specified regular expression.-min-class-padding=<uint>β Only display types that have at least the specified amount of alignment padding, accounting for padding in base classes and aggregate field members.-min-class-padding-imm=<uint>β Only display types that have at least the specified amount of alignment padding, ignoring padding in base classes and aggregate field members.-min-type-size=<uint>β Only display typesTwheresizeof(T)is greater than or equal to the specified amount.-no-compiler-generatedβ Don't show compiler generated types and symbols.-no-enum-definitionsβ When dumping an enum, don't show the full enum (e.g. the individual enumerator values).-no-system-libsβ Don't show symbols from system libraries.
Symbol Type Options
-allβ Implies all other options in this category. It's the "select all" of symbol type options. β¨-class-definitions=<format>β Displays class definitions in the specified format.=allβ Display all class members including data, constants, typedefs, functions, etc (default)=layoutβ Only display members that contribute to class size.=noneβ Don't display class definitions (e.g. only display the name and base list)
-class-orderβ Displays classes in the specified order.=noneβ Undefined / no particular sort order (default)=nameβ Sort classes by name=sizeβ Sort classes by size=paddingβ Sort classes by amount of padding=padding-pctβ Sort classes by percentage of space consumed by padding=padding-immβ Sort classes by amount of immediate padding=padding-pct-immβ Sort classes by percentage of space consumed by immediate padding
-class-recurse-depth=<uint>β When dumping class definitions, stop after recursing the specified number of times. The default is0, which is no limit.-classesβ Display classes.-compilandsβ Display compilands (e.g. object files).-enumsβ Display enums.-externalsβ Dump external (e.g. exported) symbols.-globalsβ Dump global symbols.-linesβ Dump the mappings between source lines and code addresses.-module-symsβ Display symbols (variables, functions, etc) for each compiland.-sym-types=<types>β Type of symbols to dump when-globals,-externals, or-module-symsis specified. (defaultall)=thunksβ Display thunk symbols=dataβ Display data symbols=funcsβ Display function symbols=allβ Display all symbols (default)
-symbol-order=<order>β For symbols dumped via the-module-syms,-globals, or-externalsoptions, sort the results in specified order.=noneβ Undefined / no particular sort order=nameβ Sort symbols by name=sizeβ Sort symbols by size
-typedefsβ Display typedef types.-typesβ Display all types (implies-classes,-enums,-typedefs).
Other Options
-color-outputβ Force color output on or off. By default, color is used if outputting to a terminal. π-load-address=<uint>β When displaying relative virtual addresses, assume the process is loaded at the given address and display what would be the absolute address.
π dump
USAGE: llvm-pdbutil dump [options] <input PDB file>
Summary
The dump subcommand displays low level information about the structure of a PDB file. It is used heavily by LLVM's testing infrastructure, but can also be used for PDB forensics. It serves a role similar to that of Microsoft's cvdump tool. It's giving "microscope for PDB internals" energy. π¬
NOTE: The dump subcommand exposes internal details of the file format. As such, the reader should be familiar with The PDB File Format before using this command. Bestie, do your reading first. This is not a vibes-only situation.
Options
MSF Container Options
-streamsβ dump a summary of all of the streams in the PDB file.-stream-blocksβ In conjunction with-streams, add information to the output about what blocks the specified stream occupies.-summaryβ Dump MSF and PDB header information.
Module & File Options
-modi=<uint>β For all options that dump information from each module/compiland, limit to the specified module.-filesβ Dump the source files that contribute to each displayed module.-ilβ Dump inlinee line information (DEBUG_S_INLINEELINESCodeView subsection).-lβ Dump line information (DEBUG_S_LINESCodeView subsection).-modulesβ Dump compiland information.-xmeβ Dump cross module exports (DEBUG_S_CROSSSCOPEEXPORTSCodeView subsection).-xmiβ Dump cross module imports (DEBUG_S_CROSSSCOPEIMPORTSCodeView subsection).
Symbol Options
-globalsβ dump global symbol records.-global-extrasβ dump additional information about the globals, such as hash buckets and hash values.-publicsβ dump public symbol records.-public-extrasβ dump additional information about the publics, such as hash buckets and hash values.-symbolsβ dump symbols (functions, variables, etc) for each module dumped.-sym-dataβ For each symbol record dumped as a result of the-symbolsoption, display the full bytes of the record in binary as well.
Type Record Options
-typesβ Dump CodeView type records from TPI stream.-type-extrasβ Dump additional information from the TPI stream, such as hashes and the type index offsets array.-type-dataβ For each type record dumped, display the full bytes of the record in binary as well.-type-index=<uint>β Only dump types with the specified type index.-idsβ Dump CodeView type records from IPI stream.-id-extrasβ Dump additional information from the IPI stream, such as hashes and the type index offsets array.-id-dataβ For each ID record dumped, display the full bytes of the record in binary as well.-id-index=<uint>β only dump ID records with the specified hexadecimal type index.-dependentsβ okay so this one is a sidekick option, it only does anything when you pair it with-type-indexor-id-index, and then instead of dumping just that one lonely record, it dumps the whole dependency graph hanging off that index π Like, for example: say type index0x4000is a function whose return type has index0x3000β if you specify-dependents=0x4000, you get both records (plus any other dependents chilling in the tree). It's giving "bring the whole friend group" energy fr fr.
π Miscellaneous Options π
-allβ the ultimate main character flag β¨ It implies most other options. Justβ¦ everything. All of it. Slay.-section-contribsβ dumps the section contributions, yes bestie, all of them π-section-headersβ dumps the image section headers πΈ-section-mapβ dumps the section map πΊοΈ-string-tableβ dumps the PDB string table, iconic behaviour honestly π
π¦ bytes π¦
USAGE: llvm-pdbutil bytes [options] <input PDB file>
Summary
So bytes is like dump's feral older sister π β same vibe, low level structural info about your PDB file, but dialled all the way up for even deeper forensics. It goes and finds whatever structures you asked for on the command line and dumps them in hex, no cap.
Who is this even for? Someone working on support for emitting PDBs would live in this thing, for example to compare one PDB against another PDB and make sure they're byte-for-byte compatible π₯ Because bestie, simply diffing the bytes of an entire file or an entire stream does not work β it's perfectly fine for the exact same structure to exist at different locations in two different PDBs, so "finding" the structure is literally half the battle. Periodt.
Options
MSF File Options
-block-range=<start[-end]>β dumps binary data from the specified range of MSF file blocks π§±-byte-range=<start[-end]>β dumps binary data from the specified range of bytes in the file π-fpmβ dumps the MSF free page map ποΈ-stream-data=<string>β dumps binary data from the specified streams. Format goesSN[:Start][@Size]. Example time:-stream-data=7:3@12dumps 12 bytes from stream 7, starting at offset 3 in the stream β¨ iykyk
PDB Stream Options
-name-mapβ dumps the bytes of the PDB Name Map π
DBI Stream Options
-ecβ dumps the edit and continue map substream of the DBI stream βοΈ-filesβ dumps the file info substream of the DBI stream ποΈ-modiβ dumps the modi substream of the DBI stream π§©-scβ dumps the section contributions substream of the DBI stream π-smβ dumps the section map from the DBI stream πΊοΈ-type-serverβ dumps the type server map from the DBI stream π₯οΈ
Module Options
-mod=<uint>β limits all the options in this category to the specified module index. Heads up: by default, options in this category dump bytes from all modules π-chunksβ dumps the bytes of each module's C13 debug subsection π-split-chunksβ when you specify this with-chunks, it splits the C13 debug subsection into a separate chunk for each subsection type, and dumps them separately βοΈ-symsβ dumps the symbol record substream from each module π
Type Record Options
-id=<uint>β dumps the record from the IPI stream with the given type index π-type=<uint>β dumps the record from the TPI stream with the given type index π€
π§ pdb2yaml π§
USAGE: llvm-pdbutil pdb2yaml [options] <input PDB file>
Summary
(no joke, the page literally leaves this one empty β it's giving mysterious β¨π)
Options
(also empty, bestie. nothing here. we move.)
πΈ yaml2pdb πΈ
USAGE: llvm-pdbutil yaml2pdb [options] <input YAML file>
Summary
Generates a PDB file from a YAML description π And no, the YAML syntax is not described here β instead, go use llvm-pdbutil pdb2yaml and just look at the output for an example starting point π lowkey genius, highkey chaotic.
Options
-pdb=<file-name>β writes the resulting PDB to the specified file π
π merge π
USAGE: llvm-pdbutil merge [options] <input PDB file 1> <input PDB file 2>
Summary
Merges two PDB files into a single file π«Ά Two become one, main character energy.
Options
-pdb=<file-name>β writes the resulting PDB to the specified file π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/) π
π COPYRIGHT π
2003-2023, LLVM Project
That's the whole page bestie, we ate and left absolutely no crumbs π₯π Compiled from LLVM-PDBUTIL(1), version 15, dated 2023-01-14 β go forth and dump some bytes, ily, bye π¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm15 15.0.7-160000.3.1 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms