From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4076 invoked by alias); 30 Nov 2003 03:12:15 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4069 invoked from network); 30 Nov 2003 03:12:14 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 30 Nov 2003 03:12:14 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AQI0K-0007IV-SD; Sat, 29 Nov 2003 22:12:12 -0500 Date: Sun, 30 Nov 2003 03:12:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: Ian Lance Taylor , gdb Subject: Re: C++/Java regressions Message-ID: <20031130031212.GA28028@nevyn.them.org> Mail-Followup-To: Jim Blandy , Ian Lance Taylor , gdb References: <20031126153234.GA10644@nevyn.them.org> <20031126211228.GA13423@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-11/txt/msg00298.txt.bz2 On Sat, Nov 29, 2003 at 09:56:28PM -0500, Jim Blandy wrote: > > Daniel Jacobowitz writes: > > > If it helps, that's more or less what my libiberty C++ demangler does. > > > It first translate the name into a simple tree structure, and then > > > walks the tree translating it into a string. I could expose the tree, > > > although it would have to be documented a bit better. > > > > Oh, so it's already two-pass? If we could work out an API for the > > tree, then GDB could build and supply trees to get a canonical form > > back from the demangler. That has the added bonus of not needing to > > post-process the demangler output (if we know that we've got a GNU v3 > > name and thus this demangler was used, of course - v2 would still need > > to be parsed). That sounds like an ideal solution. > > I've been wanting something like this for a long time, too. FYI, I'm in the middle (this evening) of writing the appropriate parser. It's reminding me how much I hate the grammar of C++, too. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer