All Projects → willglynn → Pdb

willglynn / Pdb

Licence: other
A parser for Microsoft PDB (Program Database) debugging information

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Pdb

Fakepdb
Tool for PDB generation from IDA Pro database
Stars: ✭ 186 (+19.23%)
Mutual labels:  debugging, pdb
symreader-converter
Converts between Windows PDB and Portable PDB formats.
Stars: ✭ 50 (-67.95%)
Mutual labels:  debugging, pdb
Python Remote Pdb
Remote vanilla PDB (over TCP sockets).
Stars: ✭ 186 (+19.23%)
Mutual labels:  debugging, pdb
ircpdb
Remotely and collaboratively debug your Python application via an IRC channel.
Stars: ✭ 59 (-62.18%)
Mutual labels:  debugging, pdb
SQLCallStackResolver
Utility to resolve SQL Server callstacks to their correct symbolic form using just PDBs and without a dump file
Stars: ✭ 55 (-64.74%)
Mutual labels:  debugging, pdb
docker-pudb
Debug Python code within a Docker container remotely from your terminal using pudb
Stars: ✭ 18 (-88.46%)
Mutual labels:  debugging, pdb
Gdb Frontend
☕ GDBFrontend is an easy, flexible and extensionable gui debugger.
Stars: ✭ 2,104 (+1248.72%)
Mutual labels:  debugging
Inappviewdebugger
A UIView debugger (like Reveal or Xcode) that can be embedded in an app for on-device view debugging
Stars: ✭ 1,805 (+1057.05%)
Mutual labels:  debugging
Cargo Flash
a cargo extension for programming microcontrollers
Stars: ✭ 134 (-14.1%)
Mutual labels:  debugging
Androidsnooper
Android library to record the network calls through the interceptor mechanism of the http clients.
Stars: ✭ 132 (-15.38%)
Mutual labels:  debugging
Atty
are you or are you not a tty?
Stars: ✭ 153 (-1.92%)
Mutual labels:  rust-library
Tentacle
A multiplexed p2p network framework that supports custom protocols
Stars: ✭ 150 (-3.85%)
Mutual labels:  rust-library
Frodo2
Android Library for Logging RxJava2 Components
Stars: ✭ 142 (-8.97%)
Mutual labels:  debugging
Rogcat
A `adb logcat` wrapper
Stars: ✭ 137 (-12.18%)
Mutual labels:  debugging
Watchdog
Class for logging excessive blocking on the main thread
Stars: ✭ 1,802 (+1055.13%)
Mutual labels:  debugging
Pdt
PHP Development Tools project (PDT)
Stars: ✭ 135 (-13.46%)
Mutual labels:  debugging
Mtpng
A parallelized PNG encoder in Rust
Stars: ✭ 151 (-3.21%)
Mutual labels:  rust-library
Android Remote Debugger
A library for remote logging, database debugging, shared preferences and network requests
Stars: ✭ 132 (-15.38%)
Mutual labels:  debugging
Strace Pipes Presentation
Presentation: Debugging across pipes and sockets with strace
Stars: ✭ 142 (-8.97%)
Mutual labels:  debugging
Sm
🚀 SM – a static State Machine library
Stars: ✭ 149 (-4.49%)
Mutual labels:  rust-library

pdb

Build Status

This is a Rust library that parses Microsoft PDB (Program Database) files. These files contain debugging information produced by most compilers that target Windows, including information about symbols, types, modules, and so on.

The PDB format is not documented per sé, but Microsoft has published information in the form of C++ code relating to its use. The PDB format is full of... history, including support for debugging 16-bit executables, COBOL user-defined types, and myriad other features. pdb does not understand everything about the PDB format, but it does cover enough to be useful for typical programs compiled today.

Design

pdb's design objectives are similar to gimli:

  • pdb works with the original data as it's formatted on-disk as long as possible.

  • pdb parses only what you ask.

  • pdb can read PDBs anywhere. There's no dependency on Windows, on the DIA SDK, or on the target's native byte ordering.

Usage Example

use pdb::FallibleIterator;
use std::fs::File;

fn main() -> pdb::Result<()> {
    let file = File::open("fixtures/self/foo.pdb")?;
    let mut pdb = pdb::PDB::open(file)?;

    let symbol_table = pdb.global_symbols()?;
    let address_map = pdb.address_map()?;

    let mut symbols = symbol_table.iter();
    while let Some(symbol) = symbols.next()? {
        match symbol.parse() {
            Ok(pdb::SymbolData::Public(data)) if data.function => {
                // we found the location of a function!
                let rva = data.offset.to_rva(&address_map).unwrap_or_default
                println!("{} is {}", rva, data.name);
            }
            _ => {}
        }
    }

    Ok(())
}

Example Programs

Run with cargo run --release --example <name>:

  • pdb_symbols is a toy program that prints the name and location of every function and data value defined in the symbol table.

  • pdb2hpp is a somewhat larger program that prints an approximation of a C++ header file for a requested type given only a PDB.

  • pdb_lines outputs line number information for every symbol in every module contained in a PDB.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].