This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] C++ method calls


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]