This is the mail archive of the
mailing list for the GCC project.
Re: GDB hooks for debugging GCC
- From: Jeff Law <law at redhat dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail 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 15:45:57 -0600
- Subject: Re: GDB hooks for debugging GCC
- References: <1375494523 dot 4994 dot 108 dot camel at surprise> <52127879 dot 10009 at redhat dot com> <CABu31nMSzhi9JxTCzF09xDnYBt9mBVWQK4kP-DnjX8A6uwT9bg at mail dot gmail dot com>
On 08/19/2013 03:28 PM, Steven Bosscher wrote:
Not exactly what I was talking about, though I did have David do some
work on CFG dumping a while back. Think about the ability to do things
like collapse regions and the like.
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.)
In this specific instance I was referring to getting meaningful data out
of gdb when I do something like "p bb" or "p e" for a block and edge
Printing the pointer is useful, but printing information about the
actual block/edge is far more useful :-) It'd save a lot of "debug_bb
(bb)" as well a p "e->src->index" and "p e->dest->index" in my
interactive debug sessions.