gdb 0.1.0

Library for controlling GDB
Documentation
  • Coverage
  • 0%
    0 out of 26 items documented0 out of 0 items with examples
  • Size
  • Source code size: 50.79 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.5 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • lipk/rust-gdb
    11 3 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • lipk

Description

rust-gdb is a WIP library for controlling GDB from Rust programs. At the moment, it can launch a GDB process, pass commands, and parse gdb's responses. rust-gdb uses GDB's Machine Interface.

Missing features:

  • Handle asynchronous output from GDB (currently it's ignored)
  • Better interface for executing commands
  • Proper documentation

Usage

Launching the debugger

use gdb;

let debugger = gdb::Debugger::start();

The library will look for the gdb binary in your path.

Executing commands

use gdb;

let mut debugger = gdb::Debugger::start();
let response = debugger.send_cmd_raw("your-command-here");

send_cmd_raw currently blocks until it gets a result record from GDB, so don't use async commands :)

Response format

Currently only result records are returned by send_cmd_raw. GDB/MI output structure is described here, rust-gdb practically transforms this into a syntax tree, as described in msg.rs.