From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17005 invoked by alias); 26 Nov 2003 21:05:04 -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 16998 invoked from network); 26 Nov 2003 21:05:02 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 26 Nov 2003 21:05:02 -0000 Received: (qmail 25368 invoked by uid 10); 26 Nov 2003 21:05:01 -0000 Received: (qmail 16468 invoked by uid 500); 26 Nov 2003 21:04:55 -0000 From: Ian Lance Taylor To: Daniel Jacobowitz Cc: gdb Subject: Re: C++/Java regressions References: <20031126153234.GA10644@nevyn.them.org> Date: Wed, 26 Nov 2003 21:05:00 -0000 In-Reply-To: <20031126153234.GA10644@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/msg00262.txt.bz2 Daniel Jacobowitz writes: > On Tue, Nov 25, 2003 at 11:04:41PM -0500, Ian Lance Taylor wrote: > > Then when gdb goes to look up T5, it finds the DWARF psymbol for > > the class itself, but it also finds that the symbol might be a > > namespace. It then decides that it is a namespace. > > That sounds like the bit that's wrong. If it found a psymbol for the > class why does it decide to call it a namespace? Good question. My guess is that it's because lookup_symbol_aux() calls current_language->la_lookup_symbol_nonlocal() before it calls lookup_symbol_aux_psymtabs(). If I force la_lookup_symbol_nonlocal() to return NULL, then lookup_symbol_aux_psymtabs() finds the typedef, and `ptype T5' works more or less correctly. One solution might be that when gdb finds that a symbol has a class definition, it makes sure that it does not have a pseudo-namespace definition. > 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. Ian