Skip to content

Category Archives: gdb

The GNU debugger

1. Installing a Python-enabled debugger

This is the first in what I hope will be a series on using the python-enabled gdb. We’ll start at the very beginning: checking it out, building it, and then “hello, world”. First, install the prerequisites — aside from the normal development stuff, you will need the python development packages.  You will also need git.  [...]

How to how-to?

Clearly, we need to publicize the gdb/python integration a bit more.  It is easy to get, and reasonably functional. I’ve been thinking a bit about how to get the word out better.  What is most effective?  Here are some ideas: A series of “how-to” blog entries (what do you want to do?) A “how-to” article [...]

Debugging the debugger

After working on gdb for a while, I’ve noticed a funny flaw: gdb is too good at debugging itself. I often hear stories of disappointment from gdb users.  It doesn’t scale well.  It doesn’t handle threads well.  It only has a vague understanding of the C++ that users insist on typing at it.  That was [...]

A Misery of Debugging

Some days when I am debugging, I run across a bug in gdb and think, “I wish someone would fix that already”. Then I remember that I’m working on gdb now.

Driving GDB

One goal I have for integrating Python scripting into gdb is to be able to fully control gdb from Python. I’ve made a few steps toward this recently. Today I can do: #! /home/tromey/gnu/python-gdb/build/gdb/gdb –python import sys, gdb from hack import inferior child = inferior(sys.argv) if not child.run(): gdb.execute(“bt 5″) gdb.cli() This is a short [...]