From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26635 invoked by alias); 8 Aug 2008 04:20:23 -0000 Received: (qmail 26616 invoked by uid 22791); 8 Aug 2008 04:20:21 -0000 X-Spam-Check-By: sourceware.org Received: from igw1.br.ibm.com (HELO igw1.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Aug 2008 04:19:38 +0000 Received: from mailhub1.br.ibm.com (mailhub1 [9.18.232.109]) by igw1.br.ibm.com (Postfix) with ESMTP id E91A732C1E0 for ; Fri, 8 Aug 2008 00:50:47 -0300 (BRT) Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m784JV122424860 for ; Fri, 8 Aug 2008 01:19:31 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m784JPJw008690 for ; Fri, 8 Aug 2008 01:19:25 -0300 Received: from [9.8.5.115] ([9.8.5.115]) by d24av01.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m784JPJp008486; Fri, 8 Aug 2008 01:19:25 -0300 Subject: Re: Data plugins for gdb... From: Thiago Jung Bauermann To: Daniel Jacobowitz Cc: "Ryan C. Gordon" , gdb-patches@sourceware.org In-Reply-To: <20080808003020.GA17221@caradoc.them.org> References: <489B83F7.2080609@icculus.org> <20080808003020.GA17221@caradoc.them.org> Content-Type: text/plain Date: Fri, 08 Aug 2008 04:20:00 -0000 Message-Id: <1218169143.11103.30.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00185.txt.bz2 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