python scripting in gdb!

It seems the planets are finally aligning to get Python scripting support in GDB! Vladimir published his changes last month, Tromey improved on them, and I joined the bandwagon.

The work is being done in a git repo hosted by gitorious. More details here.

This looks very promising.

Update – 2008/03/15: Sorry, I was a bit cryptic in this post. It’s not really about enabling debug of Python programs using GDB (which is a neat idea, and I hope to play with it sometime). It’s about integrating a Python interpreter into GDB and exposing its internals as an API to be used by Python scripts. This will enable people to automate and extend GDB functionality using Python. This feature has been asked many times before, and finally is being addressed. Should open many possibilities.


7 Responses to “python scripting in gdb!”

  1. Seems interesting for me… I ‘ll follow the discussion and maybe contribute with, thanks ;-)

    [ ]s
    Carlos.

  2. [...] notĂ­cia veio do Bauermann e seu anĂșncio da novidade pode ser lido diretamente na lista do gdb neste [...]

  3. [...] Abril 30, 2008 de bauermann As I mentioned before, I’ve been working on and off on adding Python scripting support to GDB, with Tom Tromey and [...]

  4. [...] not much, but still…) and am at least partially involved in a few current GDB developments (python scripting and reversible [...]

  5. Thank you for this page! It continues to be about the best Google-facing page to find the links to this project. Actually, rhetorical question, is this the same project as PythonGDB at http://sourceware.org/gdb/wiki/PythonGdb

    …that page contains no links to the git repo, from what I can tell. A search for PythonGDB brings up nothing useful for that page. A search for gdb-python brings up the git repo, at least. This is an extraordinarily interesting project, but you guys need to do some PR work. =)

  6. The ZeroBUGS debugger has introduced Python scripting some two years ago!

    This shows one more time that the Open Source community copies ideas from others more often than invent new stuff.

    • Well, it’s not true that GDB copied the idea from ZeroBUGS. If you look at the mailing list archives in early 2007 you’ll see that ZeroBUGS was not mentioned at all when discussions were held to select which scripting language GDB should support. Nor any other debugger was mentioned, if I recall correctly. The discussion was focused on merits of the scripting languages being considered, not on features from other debuggers. You should not make these accusations without any base.

      But it’s true that GDB is lagging behind from other debuggers in terms of features. Lately, the GDB community has been regaining development speed, so perhaps we can catch up.

Leave a Reply