From mboxrd@z Thu Jan 1 00:00:00 1970 From: dberlin@redhat.com (Daniel Berlin+list.gdb-patches) To: Nick Duffek Cc: gdb-patches@sourceware.cygnus.com Subject: Re: [RFA] C++ method calls Date: Sat, 08 Jul 2000 20:02:00 -0000 Message-id: <863dlkatux.fsf@dan2.cygnus.com> References: <200007090205.e69259n00849@rtl.cygnus.com> X-SW-Source: 2000-07/msg00089.html Nick Duffek 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 > > * 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