Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [patch/testsuite/cp] local.exp: accommodate gcc abi 2
@ 2004-01-05 20:27 Michael Elizabeth Chastain
  2004-01-05 21:34 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2004-01-05 20:27 UTC (permalink / raw)
  To: cagney, mec.gnu; +Cc: gdb-patches

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


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [patch/testsuite/cp] local.exp: accommodate gcc abi 2
@ 2004-01-03  1:45 Michael Elizabeth Chastain
  2004-01-05 16:01 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2004-01-03  1:45 UTC (permalink / raw)
  To: gdb-patches

This expands local.exp to accommodate gcc HEAD -gstabs+ with the new abi.
As with several other files, I just cloned the pattern for
gcc 3.3.2 -gstabs+ abi-1 and re-ordered the fields.

Tested with:

  native i686-pc-linux-gnu
  gcc 2.95.3 3.3.2 HEAD
  dwarf2, stabs+
  tcl 8.4.5, expect 5.39, dejagnu 1.4.3
  tcl + expect + dejagnu from sourceware

I am committing this now.

Michael C

2004-01-02  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.cp/local.exp: Accept gcc abi 2.

Index: local.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/local.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 local.exp
*** local.exp	23 Aug 2003 03:55:59 -0000	1.1
--- local.exp	3 Jan 2004 01:40:16 -0000
***************
*** 1,4 ****
! # Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
--- 1,5 ----
! # Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
! # Free Software Foundation, Inc.
  
  # This program is free software; you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
*************** gdb_test "up" ".*foobar.*" "up from mark
*** 96,101 ****
--- 97,109 ----
  #
  # chastain 2002-04-08
  
+ # pattern #5
+ # PASS
+ #   stabs+
+ #     gcc HEAD abi-2
+ #
+ # chastain 2004-01-02
+ 
  set sep "(\[.\]|___)\[0-9\]"
  
  send_gdb "ptype Local\n"
*************** gdb_expect {
*** 106,111 ****
--- 114,120 ----
    }
    -re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*Local & operator *=\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((void|)\\);\[\r\n\t \]*char loc_foo\\(char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
    -re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\)\r\n\}.*$gdb_prompt $" { xpass "ptype Local (old aCC)" }
+   -re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\(char\\);\[\r\n\t \]*Local & operator *=\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((void|)\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
    -re ".*$gdb_prompt $"   {  fail "ptype Local" }
    timeout             { fail "(timeout) ptype Local" }
  }
*************** gdb_expect {
*** 131,136 ****
--- 140,149 ----
          # this right.
          kfail gdb/825 "Local out of scope"
      }
+     -re "ptype Local${eol}type = class Local {${eol}  public:${eol}    int loc1;${eol}    char loc_foo\\(char\\);${eol}.*${eol}}${eol}${gdb_prompt} " {
+ 	# gcc 3.X abi-2 -gstabs+
+         kfail gdb/825 "Local out of scope"
+     }
      -re ".*${gdb_prompt} $" {
          fail "Local out of scope"
      }
*************** gdb_expect {
*** 168,179 ****
--- 181,200 ----
  #
  # chastain 2002-05-27
  
+ # Pattern 5:
+ # PASS
+ #   stabs+
+ #     HEAD
+ #
+ # chastain 2004-01-02
+ 
  send_gdb "ptype InnerLocal\n"
  gdb_expect {
    -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 1)" }
    -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 2)" }
    -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
    -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
+   -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]* int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 5)" }
    -re ".*$gdb_prompt $"   {  fail "ptype InnerLocal" }
    timeout             { fail "(timeout) ptype InnerLocal" }
  }


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-01-05 21:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-05 20:27 [patch/testsuite/cp] local.exp: accommodate gcc abi 2 Michael Elizabeth Chastain
2004-01-05 21:34 ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2004-01-03  1:45 Michael Elizabeth Chastain
2004-01-05 16:01 ` Andrew Cagney
2004-01-05 16:05   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox