LLVM-PDBUTIL(1)
💖 NAME 💖
llvm-pdbutil — PDB File forensics and diagnostics. No cap, that's literally the whole name. 💅
okay bestie, this manual page is your group chat for PDB files. Here's the map of everything inside:
- 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 🌸
Bestie, listen. llvm-pdbutil displays types, symbols, CodeView records, and other information from a PDB file, and it also manipulates and creates PDB files. Iconic. It 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. iykyk.
🦋 SUBCOMMANDS 🦋
llvm-pdbutil is separated into several subcommands, each tailored to a different purpose. Main character energy per subcommand. A brief summary of each command follows, with more detail in the sections that follow.
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 not on Windows, this one's not your bestie.
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 authoritative.
✨ 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 stays winning.
-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. Not invited to the party.-exclude-symbols=<string>— When dumping global, public, or per-compiland symbols, this option tellsllvm-pdbutilto omit any symbols that match the specified regular expression. Bye.-exclude-types=<string>— When dumping types, this option tellsllvm-pdbutilto omit any types that match the specified regular expression. Type? Never heard of her.-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. Keep the main characters only.-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. Symbols only, bestie.-include-types=<string>— When dumping types, limit the initial search to only those types that match the specified regular expression. Type filter, slay.-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. Padding check!-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. Immediate padding, no cap.-min-type-size=<uint>— Only display types T wheresizeof(T)is greater than or equal to the specified amount. Size check.-no-compiler-generated— Don't show compiler generated types and symbols. Not the compiler's fake friends.-no-enum-definitions— When dumping an enum, don't show the full enum (e.g. the individual enumerator values). Just the name, not the whole story.-no-system-libs— Don't show symbols from system libraries. System libs? Not today.
👑 Symbol Type Options 👑
-all— Implies all other options in this category. Everything everywhere all at once.-class-definitions=<format>— Displays class definitions in the specified format.=all— Display all class members including data, constants, typedefs, functions, etc (default) the whole class roster.=layout— Only display members that contribute to class size. size matters.=none— Don't display class definitions (e.g. only display the name and base list) mysterious.
-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 deeper, bestie.-classes— Display classes. Slay.-compilands— Display compilands (e.g. object files). Object files in the chat.-enums— Display enums. Enum girlies.-externals— Dump external (e.g. exported) symbols. Externals, the outer circle.-globals— Dump global symbols. Worldwide.-lines— Dump the mappings between source lines and code addresses. Line-by-line.-module-syms— Display symbols (variables, functions, etc) for each compiland. Per-module gossip.-sym-types=<types>— Type of symbols to dump when-globals,-externals, or-module-symsis specified. (default all)=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. Typedef nation.-types— Display all types (implies-classes,-enums,-typedefs). All the types, periodt.
🎀 Other Options 🎀
-color-output— Force color output on or off. By default, color is used if outputting to a terminal. Vibe check: colors.-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. Math but make it addresses.
🦋 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. Forensics? It's giving detective era.
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. Do your homework first, bestie.
✨ Options ✨
💖 MSF Container Options 💖
-streams— dump a summary of all of the streams in the PDB file. Streams? In this economy?-stream-blocks— In conjunction with-streams, add information to the output about what blocks the specified stream occupies. Block party.-summary— Dump MSF and PDB header information. TL;DR energy.
🎀 Module & File Options 🎀
-modi=<uint>— For all options that dump information from each module/compiland, limit to the specified module. Pick a module, any module.-files— Dump the source files that contribute to each displayed module. Source files, the receipts.-il— Dump inlinee line information (DEBUG_S_INLINEELINESCodeView subsection) Inlinee? More like in-line-yay.-l— Dump line information (DEBUG_S_LINESCodeView subsection) Lines, lines, lines.-modules— Dump compiland information. Module gossip.-xme— Dump cross module exports (DEBUG_S_CROSSSCOPEEXPORTSCodeView subsection) Exporting across modules? The crossover event.-xmi— Dump cross module imports (DEBUG_S_CROSSSCOPEIMPORTSCodeView subsection) Importing? The crossover event part 2.
👑 Symbol Options 👑
-globals— dump global symbol records. Globals.-global-extras— dump additional information about the globals, such as hash buckets and hash values. Extras? The director's cut.-publics— dump public symbol records. Publics.-public-extras— dump additional information about the publics, such as hash buckets and hash values. Public extras, the bonus features.-symbols— dump symbols (functions, variables, etc) for each module dumped. Symbols, the main characters.-sym-data— For each symbol record dumped as a result of the-symbolsoption, display the full bytes of the record in binary as well. Bytes? Raw and unfiltered.
🌈 Type Record Options 🌈
-types— Dump CodeView type records from TPI stream. TPI stream, let's go.-type-extras— Dump additional information from the TPI stream, such as hashes and the type index offsets array. Extra, extra, read all about it.-type-data— For each type record dumped, display the full bytes of the record in binary as well. Binary bytes, no cap.-type-index=<uint>— Only dump types with the specified type index. One type index only.-ids— Dump CodeView type records from IPI stream. IPI stream, the sequel.-id-extras— Dump additional information from the IPI stream, such as hashes and the type index offsets array. More extras.-id-data— For each ID record dumped, display the full bytes of the record in binary as well. ID data, raw.-id-index=<uint>— only dump ID records with the specified hexadecimal type index. Hex index? Math girlie.-dependents— okay so when you pair this with-type-indexor-id-index, it dumps the entire dependency graph for that index instead of just the single record. Like, if type index0x4000is a function whose return type has index0x3000, and you go-dependents=0x4000, then boom 💥 it dumps both records (plus any other dependents in the tree). Obsessed with the thoroughness, fr fr. 🫶
Miscellaneous Options ✨
-all— implies most other options. It's giving "I want everything" energy. 💅-section-contribs— dumps section contributions.-section-headers— dumps image section headers.-section-map— dumps section map.-string-table— dumps PDB string table. 🧵
bytes 🦋
USAGE: llvm-pdbutil bytes [options] <input PDB file>
Summary
Like the dump subcommand, the bytes subcommand shows low level info about the structure of a PDB file, but it's for even deeper forensics. 🔍 The bytes subcommand 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's 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. No cap. 🧚
Options
MSF File Options
-block-range=<start[-end]>— dumps binary data from specified range of MSF file blocks.-byte-range=<start[-end]>— dumps binary data from 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 isSN[:Start][@Size]. For example,-stream-data=7:3@12dumps 12 bytes from stream 7, starting at offset 3 in the stream. So extra, I love it. 💖
PDB Stream Options
-name-map— dumps bytes of 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 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 options in this category to the specified module index. By default, options in this category will dump bytes from all modules. So if you want to be picky, go off. 💅-chunks— dumps the bytes of each module's C13 debug subsection.-split-chunks— when specified with-chunks, split the C13 debug subsection into a separate chunk for each subsection type, and dump them separately. It's giving organized. 🎀-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
Options
-pdb=<file-name>— write the resulting PDB to the specified file. 💾
yaml2pdb 🧚
USAGE: llvm-pdbutil yaml2pdb [options] <input YAML file>
Summary
Generate 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. It's a whole vibe. ✨
Options
-pdb=<file-name>— write the resulting PDB to the specified file.
merge 💜
USAGE: llvm-pdbutil merge [options] <input PDB file 1> <input PDB file 2>
Summary
Merge two PDB files into a single file. Slay. 💅
Options
-pdb=<file-name>— write the resulting PDB to the specified file.
AUTHOR
Maintained by the LLVM Team (https://llvm.org/).
COPYRIGHT
2003-2024, LLVM Project
And that's the tea! ☕ This was LLVM-PDBUTIL(1) from the LLVM Project, version 12, dated 2024-07-18. Stay iconic, bestie. 🫶✨💖
📦 where this page comes from
- fedora 43: llvm12 12.0.1-12.fc41 · NCSA
- fedora 43: llvm12 12.0.1-12.fc41 · NCSA
- fedora 44: llvm12 12.0.1-12.fc41 · NCSA
- fedora 44: llvm12 12.0.1-12.fc41 · NCSA
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms