This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/testsuite/cp] templates.exp: accept demangler whitespace change
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: carlton at bactrian dot org, gdb-patches at sources dot redhat dot com
- Date: Tue, 6 Jul 2004 15:33:49 -0400 (EDT)
- Subject: [patch/testsuite/cp] templates.exp: accept demangler whitespace change
The C++ demangler has had some changes recently and this caused
a white-space change in the "ptype" output.
# gdb 6.1.1
# - gcc HEAD 2004-06-19 -gstabs+
# + gcc HEAD 2004-07-05 -gstabs+
(gdb) ptype quxint
-type = class Qux<int,(char*)(&string)> {^M
+type = class Qux<int,(char*)(& string)> {^M
...
- Qux<int,(char*)(&string)> & operator=(Qux<int, &(string)> const&);^M
+ Qux<int,(char*)(& string)> & operator=(Qux<int, &(string)> const&);^M
...
This patch accepts both the old and new output.
Tested on:
native i686-pc-linux-gnu
gcc 2.95.3, 3.3.3, 3.4.0, HEAD 2004-07-05
dwarf-2, stabs+
I am committing this now.
Also, I'll fire up my demangler-tester and run my 137,827 symbols
through it and see what happens.
Michael C
2004-07-06 Michael Chastain <mec.gnu@mindspring.com>
* gdb.cp/templates.exp: Accept whitespace change in demangler
output.
Index: gdb.cp/templates.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/templates.exp,v
retrieving revision 1.10
diff -c -3 -p -r1.10 templates.exp
*** gdb.cp/templates.exp 12 Mar 2004 16:40:07 -0000 1.10
--- gdb.cp/templates.exp 6 Jul 2004 19:25:58 -0000
*************** gdb_expect {
*** 453,462 ****
send_gdb "ptype quxint\n"
gdb_expect {
! -re "type = class Qux<int, ?&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
! -re "type = class Qux<int, ?&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
! -re "type = class Qux<int, ?\\(char ?\\*\\)\\(&string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
! -re "type = class Qux<int, ?&\\(string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" {
kfail "gdb/1512" "ptype quxint"
}
-re "$gdb_prompt $" { fail "ptype quxint" }
--- 453,462 ----
send_gdb "ptype quxint\n"
gdb_expect {
! -re "type = class Qux<int, ?& ?string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
! -re "type = class Qux<int, ?& ?string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
! -re "type = class Qux<int, ?\\(char ?\\*\\)\\(& ?string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
! -re "type = class Qux<int, ?& ?\\(string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" {
kfail "gdb/1512" "ptype quxint"
}
-re "$gdb_prompt $" { fail "ptype quxint" }