From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1696 invoked by alias); 26 Nov 2003 21:32: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 1689 invoked from network); 26 Nov 2003 21:32:14 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 26 Nov 2003 21:32:14 -0000 Received: (qmail 27019 invoked by uid 10); 26 Nov 2003 21:32:14 -0000 Received: (qmail 16738 invoked by uid 500); 26 Nov 2003 21:32:08 -0000 From: Ian Lance Taylor To: Daniel Jacobowitz Cc: gdb Subject: Re: C++/Java regressions References: <20031126153234.GA10644@nevyn.them.org> <20031126211228.GA13423@nevyn.them.org> Date: Wed, 26 Nov 2003 21:32:00 -0000 In-Reply-To: <20031126211228.GA13423@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-11/txt/msg00267.txt.bz2 Daniel Jacobowitz writes: > > > I'm considering a routine for canonicalization of C++ demangled names. > > > > 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. It sounds workable to me. You may want to take a look at enum d_comp_type and struct d_comp near the top of libiberty/cp-demangle.c, and see if it is the type of thing you could imagine using. > Do you have an opinion on the "A::bar const" DMGL_PARAMS issue that > Michael Chastain noticed, by the way? Yes, I think it should print A::bar without the const. I have the patch in my sources, but I haven't checked it in yet. Ian