This is the mail archive of the
mailing list for the GCC project.
Re: GDB hooks for debugging GCC
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: David Malcolm <dmalcolm at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 19 Aug 2013 23:28:11 +0200
- Subject: Re: GDB hooks for debugging GCC
- References: <1375494523 dot 4994 dot 108 dot camel at surprise> <52127879 dot 10009 at redhat dot com>
On Mon, Aug 19, 2013 at 9:56 PM, Jeff Law <firstname.lastname@example.org> wrote:
> On 08/02/2013 07:48 PM, David Malcolm wrote:
>> GDB 7.0 onwards supports hooks written in Python to improve the
>> quality-of-life within the debugger. The best known are the
>> pretty-printing hooks , which we already use within libstdc++ for
>> printing better representations of STL containers.
> So as I mentioned during the Cauldron, I really like this and feel it could
> simplify certain aspects of debugging. What's even better is we can easily
> twiddle this stuff to further improve the experience as we use it more. Of
> course I'm particularly interested in blocks & edges, so that's where you'll
> probably see further feedback from me.
I assume you mean basic blocks and edges? For that, you can already
use the CFG pretty printers with a file attached to a pipe and sent
through XDot (http://code.google.com/p/jrfonseca/wiki/XDot) which is
written in Python and quite easy to integrate in a GDB Python routine.
(I did just that not too long ago but I can't find the code just now.)