This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Start abstraction of C++ abi's
- To: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Subject: Re: [PATCH] Start abstraction of C++ abi's
- From: Daniel Berlin <dberlin at redhat dot com>
- Date: 18 Feb 2001 19:51:27 -0500
- Cc: gdb-patches at sources dot redhat dot com
- References: <200102190009.QAA20605@bosch.cygnus.com>
Michael Elizabeth Chastain <chastain@cygnus.com> writes:
> Looks like a good idea to me. "set demangle" currently shows five
> different styles (gnu, lucid, arm, hp, edg). We know that gnu encompasses
> two different manglers by itself. We gotta move these things into
> virtual functions.
Well, actually, we only support 2 C++ abi's right now (4 if you really
want to try to call cfront an ABI), HP, GNUv2.
We can demangle functions for lucid/arm/edg, but we can't actually do
anything advanced with programs using those abi's (if they exist),
like virtual function calling/virtual base searching/etc.
>
> I won't comment on the directory structure (cp/cp-abi versus cp-abi);
> maybe a maintainer would like to think about that.
>
> Some specific comments:
>
> > ! constructor_prefix_p (physname)
> > ! || destructor_prefix_p (physname)
> > ! || STREQN (method_name, "~", 1);
>
> Does that lingering STREQN have to be there?
I can make it strncmp, or just check method_name[1], but it doesn't
make sense otherwise. It's just seeing if the first letter is a "~" in
the actual demangled method name, rather than the mangled name.
>
> > demangled_name =
> > cplus_demangle (mangled_name,
> > ! DMGL_ANSI | DMGL_PARAMS | DMGL_VERBOSE);
>
> This looks like you mixed in a bit from a different patch -- there is no
> DMGL_VERBOSE in the gdb cvs tree yet.
Yup. It's from the demangle changes I haven't gotten approved yet.
I'll cut it out.
>
> Beyond that I haven't proof-read the code yet.
>
> Michael