This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: Data plugins for gdb...


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


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