This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB hooks for debugging GCC


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 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.

[ ... ]


Note that this doesn't eliminate the .gdbinit script that some people
use, but it's arguably far superior, in that it happens automatically,
and for all values that are printed e.g. in backtraces, viewing struct
fields, etc.
Right.


I'd like to get this into trunk.  Some remaining issues:
   * installation; currently one has to manually copy it into place, as
noted above; it would be nice to automate things so that during a build
it gets copied to cc1-gdb.py, cc1plus-gdb.py etc
Perhaps add -iex "add-auto-load-safe-path <gcc source path>" in .gdbinit? I can't imagine typing that every time I start up...






   * it hardcoded values in a few places rather than correctly looking up
enums
   * the kludge in the RTX printer mentioned above.
Given this stuff is in python, I'm comfortable letting you own it and decide if/when/how to fix these warts.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]