GDDB README

GDDB - The GD Debugger

gddb is a debugger that is heavily integrated with python. Using ipython, gddb attempts to present gdb-like interface.

Requirements

To run gddb as an interactive tool with python, IPython must be installed. gddb was developed with Python 2.4. GDDB's build system is implemented in scons.

Build process

Building gddb:

scons

gddb depends on the nasm project (http://nasm.sourceforge.net/) for x86 disassembly. The necessary files are taken from the nasm-0.98.39 tree.

Installing

The current install process is entirely manual. Once built, you must copy gddb.py, gddb_py.so, and address.py to a location in your python path. (Alternately, you can set PYTHONPATH to include the python subdirectory of the gddb directory.)

Running

Introduction:

$ cd bin
$ gddb ../test/nested_loop
Welcome to GDDB. Type 'info commands' to get a list of
commands.

(gddb) [1]: info commands

The following are commands understood by gddb's ipython magic
function interface. For specific help type '?command' for each
command.
    run
    cont
    info
    break
    remove
    disable
    enable
    ex
    stepi
    disasm

Scripting

The real power of gddb is its scripting ability. Upon startup, gddb places a variable called debugger into the ipython namespace. The debugger object is integrated with the ipython magic commands, however these commands can called directly on the debugger object (and thus scripted).

Known Bugs

GDDB is currently in the experimental stage, lacking numerous features most people expect from a fully functional source-level debugger like gdb.

Signals

GDDB does not currently handle signals correctly. Getting them right with the ptrace api is a bit of black magic, and this is the next big hurdle for gddb. The current plan is to have the 0.2.0 release handle (most) signals correctly.

Debugging information

Currently gddb only uses symbol information (as gathered by nm), and does not included source-level info (line numbers, type info) that would be included when a program is built with -g in gcc. Currently gddb is targeting "very low level" debugging, ie self-modifying and other code where such high-level information is unavailable.

Threads

GDDB does not handled threaded code specially. GDB uses special hooks into the pthreads library to help people debug threaded code. I am unconvinced this is the right way to debug threaded code.

Author:Dan Williams (dan_williams@cs.virginia.edu)
Last update:Dec 2007
Title:GDDB README