LLVM-PDBUTIL(1)
NAME 🎀
okay bestie, sit down, hydrate, because we're about to get deep into a debug file format 💖
llvm-pdbutil — PDB File forensics and diagnostics. that's the whole vibe.
and here's the lil map of everything inside this page, so you know where you're going:
- 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
- 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
this page lives in the LLVM manual set, section 1 (user commands, the fun section) 👑
SYNOPSIS ✨
llvm-pdbutil [subcommand] [options]
like. that's it. that's the whole entry point. so minimal, so iconic 🦋
DESCRIPTION 💜
so what does this thing actually do, you ask? it displays types, symbols, CodeView records, and other information from a PDB file — and it can also manipulate and create PDB files. it's giving "debug info swiss army knife" fr fr 🔥
here's the tea though: llvm-pdbutil is normally used by FileCheck-based tests to test LLVM's PDB reading and writing functionality. so yes, it's lowkey a test tool first. but it can also be used for general PDB file investigation and forensics, or as a replacement for cvdump. so if you're out here doing detective work on some mysterious PDB, this is your girl 🕵️♀️💅
SUBCOMMANDS 🌈
llvm-pdbutil is separated into several subcommands, each one tailored to a different purpose. a brief summary of each follows, and the actual detail lives in the sections after that. no cap.
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. so if you're on linux bestie… this one's not for you 😭
USAGE: llvm-pdbutil pretty [options] <input PDB file>
Summary 🌸
the pretty subcommand displays a very high level representation of your program's debug info. and here's why that slaps: it's built on the Windows DIA SDK, which is the standard API that Windows tools and debuggers query debug information with. so it presents a more authoritative view of how a debugger is actually going to interpret your debug information than a mode which displays low-level CodeView records. it's the difference between "here's what the debugger sees" and "here's the raw bytes, good luck" 💅
Options ⭐
Filtering and Sorting Options 🔎
NOTE: exclude filters take priority over include filters. so if a filter matches both an include and an exclude rule, then it is excluded. exclude wins, periodt.
-exclude-compilands=<string>— When dumping compilands, compiland source-file contributions, or per-compiland symbols, this option tellsllvm-pdbutilto omit any compilands that match the specified regular expression. bye 👋-exclude-symbols=<string>— When dumping global, public, or per-compiland symbols, this option tellsllvm-pdbutilto omit any symbols that match the specified regular expression.-exclude-types=<string>— When dumping types, this option tellsllvm-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. (imm = immediate, she's not counting the inherited stuff)-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. she contains multitudes 👑-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. (go off, infinite recursion, we love a no-limits queen ✨)-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 if used if outputting to a terminal. (yes, the original really says "if used if" — we keep it exactly like that, no edits, that's the rule 💅)-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 "same energy, different font" 😌
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 please read the docs first, i am begging 🙏
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 bestie, when you use this with-type-indexor-id-index, it dumps the entire dependency graph for the index you specified instead of just the single record with that index. For example, if type index0x4000is a function whose return type has index0x3000, and you specify-dependents=0x4000, then this would dump both records (as well as any other dependents in the tree). 💅✨
✨ Miscellaneous Options ✨
-all— Implies most other options. Like, it's the main character of options. 💅-section-contribs— Dumps section contributions. Slay.-section-headers— Dumps image section headers. Headers, bestie.-section-map— Dumps section map. Map it out.-string-table— Dumps PDB string table. String table, iconic.
✨ bytes ✨
llvm-pdbutil bytes [options] <input PDB file>
✨ Summary ✨
Okay so, bytes is like dump's extra dramatic cousin — it shows low-level info about the structure of a PDB file, but for even deeper forensics. It finds various structures in a PDB file based on the command line options you specify, and dumps them in hex. Someone working on support for emitting PDBs would use this heavily, for example, to compare one PDB against another PDB to ensure byte-for-byte compatibility. It is not enough to simply compare the bytes of an entire file, or an entire stream because it’s perfectly fine for the same structure to exist at different locations in two different PDBs, and “finding” the structure is half the battle. 💅
✨ Options ✨
✨ MSF File Options ✨
-block-range=<start[-end]>— Dumps binary data from the specified range of MSF file blocks. Get those bytes.-byte-range=<start[-end]>— Dumps binary data from the specified range of bytes in the file. Byte me.-fpm— Dumps the MSF free page map. Free page map, no cap.-stream-data=<string>— Dumps binary data from the specified streams. Format isSN[:Start][@Size]. For example,-stream-data=7:3@12dumps 12 bytes from stream 7, starting at offset 3 in the stream. Streaming that data, bestie.
✨ PDB Stream Options ✨
-name-map— Dumps bytes of PDB Name Map. Name map, name map, name map.
✨ DBI Stream Options ✨
-ec— Dumps the edit and continue map substream of the DBI stream. Edit and continue, periodt.-files— Dumps the file info substream of the DBI stream. Files, files, files.-modi— Dumps the modi substream of the DBI stream. Modi vibes.-sc— Dumps section contributions substream of the DBI stream. Section contributions, slay.-sm— Dumps the section map from the DBI stream. Section map, iconic.-type-server— Dumps the type server map from the DBI stream. Type server, no cap.
✨ Module Options ✨
-mod=<uint>— Limits all options in this category to the specified module index. By default, options in this category will dump bytes from all modules. Module index, bestie.-chunks— Dumps the bytes of each module’s C13 debug subsection. Chunks, chunks, chunks.-split-chunks— When specified with-chunks, splits the C13 debug subsection into a separate chunk for each subsection type, and dumps them separately. Split them chunks.-syms— Dumps the symbol record substream from each module. Syms, syms, syms.
✨ Type Record Options ✨
-id=<uint>— Dumps the record from the IPI stream with the given type index. IPI stream, periodt.-type=<uint>— Dumps the record from the TPI stream with the given type index. TPI stream, iconic.
✨ pdb2yaml ✨
llvm-pdbutil pdb2yaml [options] <input PDB file>
✨ Summary ✨
This section is empty in the original — just a heading, no cap. 💅
✨ Options ✨
No options listed here in the original, bestie. Just the heading doing its thing. ✨
✨ yaml2pdb ✨
llvm-pdbutil yaml2pdb [options] <input YAML file>
✨ Summary ✨
Bestie, this one generates a PDB file from a YAML description. The YAML syntax is not described here. Instead, use llvm-pdbutil pdb2yaml and examine the output for an example starting point. ✨
✨ Options ✨
-pdb=<file-name>— Writes the resulting PDB to the specified file. Write that PDB, bestie.
✨ merge ✨
llvm-pdbutil merge [options] <input PDB file 1> <input PDB file 2>
✨ Summary ✨
Merge two PDB files into a single file. Periodt. 💅
✨ Options ✨
-pdb=<file-name>— Writes the resulting PDB to the specified file. Write that PDB, bestie.
✨ AUTHOR ✨
Maintained by the LLVM Team (https://llvm.org/). 👑
✨ COPYRIGHT ✨
2003-2024, LLVM Project — iconic.
That's a wrap, bestie! This page was page 15, dated 2024-04-14, from LLVM-PDBUTIL(1). Stay iconic. 💅✨
📦 where this page comes from
- ubuntu noble: llvm-16 1:16.0.6-23ubuntu4 · APACHE-2-LLVM-EXCEPTIONS
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms