This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Data plugins for gdb...
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: "Ryan C. Gordon" <icculus at icculus dot org>, gdb-patches at sourceware dot org
- Date: Fri, 08 Aug 2008 01:19:03 -0300
- Subject: Re: Data plugins for gdb...
- References: <489B83F7.2080609@icculus.org> <20080808003020.GA17221@caradoc.them.org>
On Thu, 2008-08-07 at 20:30 -0400, Daniel Jacobowitz wrote:
> On Fri, Aug 08, 2008 at 01:23:35AM +0200, Ryan C. Gordon wrote:
> >
> > I spent a few hours hacking something out as a proof of concept; I'd
> > appreciate some opinions from those that know better.
Heh, been there, done that. :-)
> The GDB project (particularly Vladimir, Tom, and Thiago) is in the
> process of adding Python support. One of the intended uses is just
> this same idea. They're still designing the command-line interface
> to it; I believe Thiago is currently looking into it.
Indeed I am.
> Vladimir's also
> made it work via MI, so that front-end GUIs can access this
> functionality too. There's more information on the PythonGDB wiki
> page.
I've been looking at Vladimir's code. It's interesting how his patch and
Ryan's converge in one thing, which is searching of a pretty-printer by
matching the string representation of the type with a string (or regexp
in the case of Vladimir's version) provided by the pretty-printer.
An alternative would be to add a new element to struct type pointing to
its pretty-printer (if any). I think this would be better, because then
you can be very specific about exactly which type you want to associate
with your semantically helpful visualizer. Think lookup_typename here,
which looks up a type within a lexical block (at least that's what its
description says).
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center