This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/symtab/c++] fix c++ rtti type lookup
- From: David Carlton <carlton at kealia dot com>
- To: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- Cc: dan at debian dot org, ezannoni at redhat dot com,gdb-patches at sources dot redhat dot com, jimb at redhat dot com
- Date: Mon, 01 Dec 2003 09:13:34 -0800
- Subject: Re: [rfa/symtab/c++] fix c++ rtti type lookup
- References: <20031127070903.48F634B40B@berman.michael-chastain.com>
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