https://github.com/camden-smallwood/pdb-decompiler
A tool to decompile MSVC PDB files to C++ source code.
https://github.com/camden-smallwood/pdb-decompiler
cpp decompile decompiler msvc pdb rust windows xbox xbox-one xbox360
Last synced: about 5 hours ago
JSON representation
A tool to decompile MSVC PDB files to C++ source code.
- Host: GitHub
- URL: https://github.com/camden-smallwood/pdb-decompiler
- Owner: camden-smallwood
- License: mit
- Created: 2022-01-04T18:25:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-06-25T13:11:30.000Z (13 days ago)
- Last Synced: 2026-06-25T15:22:09.487Z (13 days ago)
- Topics: cpp, decompile, decompiler, msvc, pdb, rust, windows, xbox, xbox-one, xbox360
- Language: Rust
- Homepage:
- Size: 339 KB
- Stars: 119
- Watchers: 9
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PDB Decompiler
* [About](#about)
* [Usage](#usage)
* [Contributing](#contributing)
## About
A tool to decompile MSVC PDB files to C++ source code.
This tool is a work in progress and will most likely crash, have duplicate output, have invalid output, or miss output entirely. Feel free to file an issue or submit a pull request.
## Usage
```
cargo run --release -- --out=/path/to/out/ --pdb=/path/to/file.pdb --base-address=0x180000000 > file.pdb.log
```
### Flags
| Short | Long | Description |
|-|-|-|
| `-c` | `--export-cpp` | Whether to export C++ code. |
| | `--export-pseudocode-to-files` | Whether to generate IDA script statements that export pseudocode to their appropriate source files. |
| | `--export-pseudocode-to-json` | Whether to generate IDA script statements that export pseudocode to a JSON mapping file. |
| | `--force-no-inlines` | Forces a `__declspec(noinline)` attribute for functions that were never inlined but did not have the attribute. |
| `-h` | `--help` | Prints help information. |
| `-r` | `--reorganize` | Whether to reorganize generated C++ code to Bungie's coding standards. (Experimental) |
| `-u` | `--unroll-functions` | Whether to include scope information in decompiled function stubs. (Experimental) |
| `-V` | `--version` | Prints version information. |
### Options
| Short | Long | Description |
|-|-|-|
| `-b` | `--base-address ` | The base address to add when resolving an RVA. (Optional) |
| | `--function-scopes-out ` | The output directory to dump all function scopes C++ code to. |
| | `--function-scopes-pdb ` | The file path to the MSVC PDB file to decompile for extra function scope information. |
| `-o` | `--out ` | The output directory to dump all C++ code to. |
| `-p` | `--pdb ` | The file path to the MSVC PDB file to decompile. |
| | `--pseudocode-json-path ` | The file containing all function pseudocode in a JSON mapping. (Optional) |
## Contributing
Any assistance or valid criticism would be appreciated. Please feel free to have a look at some of the open [issues](https://github.com/camden-smallwood/pdb-decompiler/issues), especially those tagged with [help wanted](https://github.com/camden-smallwood/pdb-decompiler/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted").