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] local.exp: accommodate gcc abi 2


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"?

The former.

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
  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
default.

Michael C


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