Re: v3 of GDB hooks for debugging GCC

2013-08-27 Thread David Malcolm
On Tue, 2013-08-27 at 09:58 -0600, Jeff Law wrote: > On 08/26/2013 12:42 PM, David Malcolm wrote: > > The patch also adds me a maintainer of gdbhooks.py into the MAINTAINERS > > file. (There doesn't seem to be any sort order to the maintainer part > > of that file, should there be?) > > > > Finall

Re: v2 of GDB hooks for debugging GCC

2013-08-27 Thread Tom Tromey
> "David" == David Malcolm writes: David> Is there a precanned event provided by gdb that I can connect to for David> when the underlying code has changed and my caches need to be David> invalidated? Maybe not :( You could use the "exited" event as a decent approximation. Also, and I think

Re: v3 of GDB hooks for debugging GCC

2013-08-27 Thread Jeff Law
On 08/26/2013 12:42 PM, David Malcolm wrote: The patch also adds me a maintainer of gdbhooks.py into the MAINTAINERS file. (There doesn't seem to be any sort order to the maintainer part of that file, should there be?) Finally, I added a copyright header to the new file ("part of GCC", FSF assi

Re: GDB hooks for debugging GCC

2013-08-26 Thread David Malcolm
On Mon, 2013-08-19 at 13:56 -0600, Jeff Law 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 [1], which we already use within libstdc++

v3 of GDB hooks for debugging GCC

2013-08-26 Thread David Malcolm
On Wed, 2013-08-21 at 15:01 -0600, Tom Tromey wrote: > > "David" == David Malcolm writes: > > Tom> Naughty. > > David> We chatted about this at Cauldron; I haven't yet had a chance to > David> implement the magic bullet approach we discussed there. In the > David> meantime, is there a API I

Re: v2 of GDB hooks for debugging GCC

2013-08-26 Thread David Malcolm
On Wed, 2013-08-21 at 15:01 -0600, Tom Tromey wrote: > > "David" == David Malcolm writes: [...] > David> How would one go about toggling the enabledness of a prettyprinter? Is > David> this something that can only be done from python? > > You can use "enable pretty-printer" and "disable pre

Re: GDB hooks for debugging GCC

2013-08-23 Thread Martin Jambor
Hi, On Fri, Aug 02, 2013 at 09:48:43PM -0400, 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 [1], which we already use within libstdc++ for > printing better representatio

Re: v2 of GDB hooks for debugging GCC

2013-08-21 Thread Tom Tromey
> "David" == David Malcolm writes: Tom> Naughty. David> We chatted about this at Cauldron; I haven't yet had a chance to David> implement the magic bullet approach we discussed there. In the David> meantime, is there a API I can call to determine how safe this kludge David> is? Not right n

v2 of GDB hooks for debugging GCC

2013-08-21 Thread David Malcolm
On Mon, 2013-08-05 at 08:26 -0600, Tom Tromey wrote: > > "David" == David Malcolm writes: > > David> GDB 7.0 onwards supports hooks written in Python to improve the > David> quality-of-life within the debugger. The best known are the > David> pretty-printing hooks [1], which we already use w

Re: GDB hooks for debugging GCC

2013-08-19 Thread Marek Polacek
On Mon, Aug 19, 2013 at 03:45:57PM -0600, Jeff Law wrote: > 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 respectively. > > Printing the pointer is useful, but printing information about the > actua

Re: GDB hooks for debugging GCC

2013-08-19 Thread Jeff Law
On 08/19/2013 03:28 PM, Steven Bosscher wrote: 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 integrat

Re: GDB hooks for debugging GCC

2013-08-19 Thread Steven Bosscher
On Mon, Aug 19, 2013 at 9:56 PM, Jeff Law 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 [1], which we already use within libstdc++

Re: GDB hooks for debugging GCC

2013-08-19 Thread Jeff Law
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 [1], which we already use within libstdc++ for printing better representations of STL containers. So as I

Re: GDB hooks for debugging GCC

2013-08-05 Thread Tom Tromey
> "David" == David Malcolm writes: David> GDB 7.0 onwards supports hooks written in Python to improve the David> quality-of-life within the debugger. The best known are the David> pretty-printing hooks [1], which we already use within libstdc++ for David> printing better representations of S

GDB hooks for debugging GCC

2013-08-02 Thread David Malcolm
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 [1], which we already use within libstdc++ for printing better representations of STL containers. I've written debug hooks for when the inferior proces