gdb

Crates.iogdb
lib.rsgdb
version0.1.0
sourcesrc
created_at2016-12-28 20:36:51.950524
updated_at2016-12-28 20:36:51.950524
descriptionLibrary for controlling GDB
homepage
repositoryhttps://github.com/lipk/rust-gdb
max_upload_size
id7824
size47,996
(lipk)

documentation

README

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.

Commit count: 29

cargo fmt