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]

[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" }


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