This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/testsuite/cp] classes.exp: rewrite
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michael Elizabeth Chastain <mec dot gnu at mindspring dot com>
- Cc: carlton at kealia dot com, gdb-patches at sources dot redhat dot com
- Date: Wed, 31 Dec 2003 09:06:45 -0500
- Subject: Re: [patch/testsuite/cp] classes.exp: rewrite
- References: <20031231111559.B0A5B4B35A@berman.michael-chastain.com>
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