From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17790 invoked by alias); 8 Apr 2007 18:51:52 -0000 Received: (qmail 17782 invoked by uid 22791); 8 Apr 2007 18:51:52 -0000 X-Spam-Check-By: sourceware.org Received: from web28004.mail.ukl.yahoo.com (HELO web28004.mail.ukl.yahoo.com) (217.146.182.109) by sourceware.org (qpsmtpd/0.31) with SMTP; Sun, 08 Apr 2007 19:51:49 +0100 Received: (qmail 73412 invoked by uid 60001); 8 Apr 2007 18:51:47 -0000 X-YMail-OSG: jLmM1IcVM1kEWv0z43Wz0ks8XdmTgwiWa0fZQ8L7Y75O6jR0aL4d40htJsm7FMQqqYQbjgw6L.Lk9bYAS5ZYmDyMoM99UfCVug-- Received: from [87.64.135.238] by web28004.mail.ukl.yahoo.com via HTTP; Sun, 08 Apr 2007 18:51:47 GMT X-Mailer: YahooMailRC/478 YahooMailWebService/0.7.41.8 Date: Sun, 08 Apr 2007 18:51:00 -0000 From: lode lathouwers Subject: Re: [PATCH] New maintenance print typechain command. To: gdb-patches@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Message-ID: <108445.72375.qm@web28004.mail.ukl.yahoo.com> 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: 2007-04/txt/msg00060.txt.bz2 On Wed, Apr 04, 2007 at 02:37:18PM +0000, lode lathouwers wrote:=20 > hi=20 > this is my first patch ever to an open source project , so probably I am = doing some things wrong here ...=20 > Anyway attached you find some changes to add an extra print typechain com= mand, which is like typechain, but instead of printing the internal nodes i= n the raw format it prints them in c-format.=20 > This is handy when we want to extract some type declarations from a serie= s of headerfiles, and generate a header file only containing the declaratio= ns for those types. Afterwards, we could for example use the file in swig t= o generate interfaces towards other programming languages.=20 Do you mean you're parsing the output of the maintenance command=20 to create your header?=20 No, the output of the ,maintenance command is directly (via copypaste)= used in the header; i.e. the output is a series of pure c(++) declarations= ,=20 so no parsing is needed. I think that's a bad idea; the maint commands=20 are intended for GDB developers to use while debugging GDB.=20 Indeed maybe the maintenance group ,might not be the best position to p= lace this command. Maybe something like info typechain might=20 be better ? Why can't you get what you need from 'info types'?=20 Info types does not show complete struct declarations (fields are not s= hown) Also it gives ALL type names,=20 while I only want to explore/print a few + their downward dependancies. --=20 Daniel Jacobowitz=20 CodeSourcery =09=09 ___________________________________________________________=20 All New Yahoo! Mail =96 Tired of unwanted email come-ons? Let our SpamGuard= protect you. http://uk.docs.yahoo.com/nowyoucan.html