xdia is a utility to extract useful program information from a PDB file in an easily parsed format (currently JSON) for other tools to consume. xdia can be run on Windows, Linux, macOS, and other platforms.
For superior compatibility, and to avoid maintaining yet another PDB parsing library, xdia simply leverages the official Debug Interface Access SDK.
Note
xdia is a new project. Functionality and interface are expected to evolve.
The main application, xdia.exe
, is a native Windows command-line application, but the project also includes xdialdr
(xdia loader) which can load and run xdia.exe
on Linux. xdialdr
is a minimal loader and compatibility layer, like Wine but focused only on running xdia.exe
and its dependencies.
In combination with xdialdr
, the Blink emulator can be used to run xdia.exe
on other operating systems and architectures, including macOS on Apple Silicon.
xdia.exe /path/to/your.pdb
or, if using xdialdr:
xdialdr /path/to/your.pdb
Name | Description |
---|---|
MSDIA_PATH |
Path to msdia140.dll, default ./msdia140.dll |
XDIA_PATH |
Path to xdia.exe, default ./xdia.exe |
Currently, only globals are listed. Example:
> xdia.exe hello-wdm.pdb
{
"globals": [
{
"addressOffset": 48,
"addressSection": 1,
"name": "_guard_dispatch_icall_nop",
"relativeVirtualAddress": 4144,
"symTag": "Function",
"undecoratedName": "_guard_dispatch_icall_nop"
},
...
}
It is a near-term goal of xdia project to provide more information, namely detailed type information.
xdia.exe
is intended only to be built with Visual Studio tools targeting x86-64 and CMake:
cmake -Ssrc/xdia -Bbuild -Ax64
cmake --build build --config Release --parallel --verbose
cmake --install build --prefix dist
cd dist
xdia.exe <path-to-pdb>
Similarly, xdialdr
is intended to be built targeting an x86-64 Linux machine with CMake:
cmake -S. -Bbuild
cmake --build build --target xdialdr
cmake --install build --prefix dist
cd dist
./xdialdr <path-to-pdb>
pyxdia provides a Python interface to xdia.