This is the mail archive of the
mailing list for the GDB project.
Re: [patch/testsuite/cp] local.exp: accommodate gcc abi 2
- From: Andrew Cagney <cagney at gnu dot org>
- To: Michael Elizabeth Chastain <mec dot gnu at mindspring dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 05 Jan 2004 16:34:35 -0500
- Subject: Re: [patch/testsuite/cp] local.exp: accommodate gcc abi 2
- References: <20040105202810.13B264B35A@berman.michael-chastain.com>
ac> Is this "The New ABI" or a yet to be named but for the moment would be
ac> best refered to as "The New New ABI"?
It's minor version 2 of "The New ABI", also known as "The IA-64 ABI".
It contains small bug fixes to g++ to make it more compatible with
the spec for "The New ABI".
gcc 2.95.3 old abi
As daniel eluded to, there was an even earlier ABI (I've no idea of its
history, I guess it was 1.x related). "The New ABI" is really the third
gcc 3.3.2 new abi, version 1
gcc 3.4.0 new abi, version 2
Here's an example of the differences between "new abi, version 1"
and "new abi, version 2": suppose that a class has a virtual destructor,
but the user doesn't specify the virtual destructor, so the compiler
synthesizes it. With "new abi, version 1", the synthesized virtual
destructor appears in the vtable *before* the user's own virtual
methods. With "new abi, version 2", the synthesized virtual destructor
appears in the vtable *after* the user's own virtual methods.
There are about 5-10 tweaks like this in gcc 3.4.
So it's not "New New ABI", fortunately for us. It's just bug fixes
to "New ABI". It's the same mangling scheme and same data structures,
but gcc puts slightly different data into them. Different enough that
g++ 3.3.X and g++ 3.4.X are sometimes not link-compatible, but similar
enough that gdb will not need a new module.
gcc 3.4 has a flag "-fabi-version" to select between "New Abi,
version 1" and "New Abi, version 2". "New Abi, version 2" is the
So "abi-version" is the minor version :-/