This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/testsuite/cp] namespace.exp: work with gcc HEAD
- From: Michael Chastain <mec dot gnu at mindspring dot com>
- To: gdb-patches at sources dot redhat dot com, david dot carlton at sun dot com,carlton at bactrian dot org
- Date: Sat, 31 Jul 2004 21:03:09 -0400
- Subject: [patch/testsuite/cp] namespace.exp: work with gcc HEAD
This is the minimum kludge to namespace.exp to make it work with the new
gcc HEAD, to accept both 'class ... { public:' and 'struct ... {'.
All these ptype tests need a lot more infrastructure; they are FAILing
on all the stabs+ configurations because they don't know about the
synthetic member functions. But that's for later.
Tested on native i686-pc-linux-gnu, gcc 2.95.3 3.3.4 3.4.1 HEAD,
dwarf-2 and stabs+.
I am committing this now.
Michael C
2004-07-31 Michael Chastain <mec.gnu@mindspring.com>
* gdb.cp/namespace.exp: Accept more varieties of ptype output.
Index: gdb.cp/namespace.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/namespace.exp,v
retrieving revision 1.7
diff -c -3 -p -r1.7 namespace.exp
*** gdb.cp/namespace.exp 11 Feb 2004 14:01:25 -0000 1.7
--- gdb.cp/namespace.exp 1 Aug 2004 00:59:54 -0000
*************** gdb_test "print E::ce" "No symbol \"ce\"
*** 254,261 ****
gdb_test "ptype C" "type = namespace C::C"
gdb_test "ptype E" "type = namespace C::D::E"
! gdb_test "ptype CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
! gdb_test "ptype CClass::NestedClass" "type = class C::CClass::NestedClass \{\r\n public:\r\n int y;\r\n\}"
gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context."
setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
--- 254,261 ----
gdb_test "ptype C" "type = namespace C::C"
gdb_test "ptype E" "type = namespace C::D::E"
! gdb_test "ptype CClass" "type = (class C::CClass \{\r\n public:|struct C::CClass \{)\r\n int x;\r\n\}"
! gdb_test "ptype CClass::NestedClass" "type = (class C::CClass::NestedClass \{\r\n public:|struct C::CClass::NestedClass \{)\r\n int y;\r\n\}"
gdb_test "ptype NestedClass" "No symbol \"NestedClass\" in current context."
setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::CClass" "type = class C::CClass \{\r\n public:\r\n int x;\r\n\}"
*************** gdb_test "ptype C::NestedClass" "No symb
*** 270,276 ****
# Tests involving multiple files
gdb_test "print cOtherFile" "\\$\[0-9\].* = 316"
! gdb_test "ptype OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}"
setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}"
gdb_test "ptype C::OtherFileClass" "No symbol \"OtherFileClass\" in namespace \"C::C\"."
--- 270,276 ----
# Tests involving multiple files
gdb_test "print cOtherFile" "\\$\[0-9\].* = 316"
! gdb_test "ptype OtherFileClass" "type = (class C::OtherFileClass \{\r\n public:|struct C::OtherFileClass \{)\r\n int z;\r\n\}"
setup_kfail "gdb/1448" "*-*-*"
gdb_test "ptype ::C::OtherFileClass" "type = class C::OtherFileClass \{\r\n public:\r\n int z;\r\n\}"
gdb_test "ptype C::OtherFileClass" "No symbol \"OtherFileClass\" in namespace \"C::C\"."