From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12329 invoked by alias); 1 Dec 2003 17:13:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12288 invoked from network); 1 Dec 2003 17:13:35 -0000 Received: from unknown (HELO hawaii.kealia.com) (209.3.10.89) by sources.redhat.com with SMTP; 1 Dec 2003 17:13:35 -0000 Received: by hawaii.kealia.com (Postfix, from userid 2049) id 878ECC6B3; Mon, 1 Dec 2003 09:13:34 -0800 (PST) To: mec.gnu@mindspring.com (Michael Elizabeth Chastain) Cc: dan@debian.org, ezannoni@redhat.com, gdb-patches@sources.redhat.com, jimb@redhat.com Subject: Re: [rfa/symtab/c++] fix c++ rtti type lookup References: <20031127070903.48F634B40B@berman.michael-chastain.com> From: David Carlton Date: Mon, 01 Dec 2003 17:13:00 -0000 In-Reply-To: <20031127070903.48F634B40B@berman.michael-chastain.com> (Michael Elizabeth Chastain's message of "Thu, 27 Nov 2003 02:09:03 -0500 (EST)") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00014.txt.bz2 On Thu, 27 Nov 2003 02:09:03 -0500 (EST), mec.gnu@mindspring.com (Michael Elizabeth Chastain) said: > This patch is a partial fix for PR c++/1465, which is the bug where > RTTI lookup gets the "namespace" symbol instead of the class symbol. Thanks; I can't recommend this for approval, but it basically looks good to me. A few quibbles: > I think I need approval from a symtab maintainer to add the new > utility function "lookup_rtti_type", and then approval from a C++ > maintainer to change gnuv2_rtti_type and gnuv3_rtti_type to call > lookup_rtti_type. Just C++ approval is fine - it's not in symtab.c, and we have other C++-specific symbol-lookup code that was moved out of symtab.c exactly so that it wouldn't require symtab approval. Though I would put the new function in cp-namespace.c/cp-support.h, until we decide to create a cp-symtab.c, because that's where the other C++-specific symtab stuff currently is. > + if (SYMBOL_CLASS (rtti_sym) != LOC_TYPEDEF) > + { > + warning ("RTTI symbol for class '%s' is not a typedef", name); I would change this to 'is not a type' - we put them in something called LOC_TYPEDEF, but users would expect 'typedef' to refer to the C/C++ meaning of the term. David Carlton carlton@kealia.com