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]
Other format: [Raw text]

Re: [patch/testsuite/cp] classes.exp: rewrite


On Wed, Dec 31, 2003 at 06:15:59AM -0500, Michael Chastain wrote:
> classes.exp has a problem with the new default gcc abi, gcc abi 2.
> I started fixing the problem and ended up rewriting most of the file.
> 
> Here's a reminder:
> 
>   /* gcc abi 1 */
>   class Whatever
>   {
>     public:
>       Whatever & operator=(const Whatever &);
>       Whatever(const Whatever &);
>       Whatever();
>       int method ();
>   };
> 
>   /* gcc abi 2*/
>   class Whatever
>   {
>     public:
>       int method ();
>       Whatever & operator=(const Whatever &);
>       Whatever(const Whatever &);
>       Whatever();
>   };
> 
> That is, with the new ABI, synthetic methods appear after the
> user-defined methods rather than before.  This really is an ABI change:
> if a class has a synthetic virtual destructor, the vtable will be
> ordered differently than it was before.
> 
> gdb prints the synthetic methods for stabs+, but not dwarf-2.
> There are about ten test scripts that get hit by this and need
> new patterns.

If we had classes with explicit destructors, you'd see the change in
both stabs and dwarf2, I believe.  I'm not quite sure about that
though.  Hmm, maybe not, maybe only the implicit one was affected.

> This is wrong; conversion operators do not have types.  This bug was
> also in gdb 6.0.  I need to KFAIL this before I commit.

It's a bug in GDB.  There's already a PR somewhere - I think it's
referenced in templates.exp.  I'll be fixing it in a little while.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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