This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] C++ method calls
- To: Nick Duffek <nsd at redhat dot com>
- Subject: Re: [RFA] C++ method calls
- From: dberlin at redhat dot com (Daniel Berlin+list.gdb-patches)
- Date: 08 Jul 2000 23:02:46 -0400
- Cc: gdb-patches at sourceware dot cygnus dot com
- References: <200007090205.e69259n00849@rtl.cygnus.com>
Nick Duffek <nsd@redhat.com> writes:
>
> the following GDB commands should fail but don't:
>
> call c.ptr (&c);
> call c.ref (c);
>
> After fixing that with part of the appended patch, the following GDB
> commands shouldn't fail but do:
>
> call c.ptr (&b);
> call c.ref (b);
>
> The patch fixes the above problems, adds gdb.c++/classes.exp tests to
> check for them, and fixes a minor indentation problem. It also seems to
> fix two gdb.c++/namespace.exp failures. There are no regressions on
> sparc-sun-solaris2.
>
> The enum test patch I posted earlier today needs to be applied first.
>
> Okay to apply?
>
> Nick Duffek
> nsd@redhat.com
>
> 2000-07-08 Nick Duffek <nsd@redhat.com>
>
> * gdbtypes.c (is_ancestor): Infer type equivalence from name
> equivalence.
> (rank_one_type): Use strcmp instead of == to compare type names.
> Don't swap parm with arg when checking TYPE_CODE_REF types.
I probably missed this one because in DWARF2, which is what i'm almost always using, unless we hit hash table collisions, which we almost never do (you'd need a *lot* of type names), == should be sufficient to compare type names when dealing with C++.
You do realize, of course, that the fact that it isn't means you are duplicating info when reading in STABS/DBX/whatever debug format you are using, that you shouldn't be.
Feel free to apply them.
--Dan