Python-enabled gdb(1)

I'm not a gdb(1) master myself, and usually only turn to it as a last resort, but I've used it enough to know that it's pretty limited, and that trying to extend it with "canned sequences of commands" was about as pleasant as working with make(1).

Tom Tromey's been blogging recently about forthcoming Python support. So instead of GDB's old joke of "canned sequences of commands" (at least they had the decency not to claim it was anything more than it was), you can now use Python. I haven't used it, but it seems impressive, and a huge leap forward.

Here's a handy table of contents if you're interested:

It's a shame to see the new features are Python-only. (But at least they're not Guile-only. Does anyone else remember when that was the "official" GNU scripting language? It's rare to see insanity that pure in public.)

I realize that supporting arbitrary languages is a non-trivial problem, but I'd love to see the Free world at least making an effort to solve this problem. Too often we see Python-only or Ruby-only or C-only or Java-only, where a useful aspect of genuine freedom would be "freedom to use whatever language you/your team are most comfortable with". I feel like applications are being used as battlegrounds to wage inter-language wars. Don't get me wrong: just because I'd rather use Ruby right now doesn't mean I won't need to use Python next year, or that I want to stop you using Java in the meantime.

Putting an end to this form of linguistic lock-in would be a huge leap forward for Free software, not just for GDB.

In the meantime, at the cost of learning Python, it looks like advanced GDB users just got a lot of interesting new opportunities.