[commit/testsuite/c++] method.exp: accept output of new demangler

Michael Elizabeth Chastain mec.gnu@mindspring.com
Tue Nov 25 17:38:00 GMT 2003


This patch improves method.exp so that it accepts the output
of the new demangler.

The old version accepted:

  A::bar (this=...)
  A::bar(int) const (this=...)

The new version accepts:

  A::bar (this=...)
  A::bar(int) const (this=...)
  A::bar const (this=...)

The v2 demangler prints "A::bar".
The old v3 demangler prints "A::bar(int) const".
The new v3 demangler prints "A::bar const".

This is not perfect, but I want to close this and get back
to bugs where gdb prints incorrect data.

Testing: tested on native i686-pc-linux-gnu, gcc v2 and v3.
I also tested it versus gdb 6.0.

I am committing this now.

Michael C

2003-11-25  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.cp/method.exp: Accept output of new demangler.

Index: method.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/method.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 method.exp
*** method.exp	23 Aug 2003 03:55:59 -0000	1.1
--- method.exp	25 Nov 2003 17:18:27 -0000
***************
*** 1,4 ****
! # Copyright 1998, 1999, 2001, 2002 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,4 ----
! # Copyright 1998, 1999, 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
*************** gdb_test "break A::bar" \
*** 96,102 ****
    "Breakpoint \[0-9\]* at $hex.*file .*method.cc, line 44\\."
  
  gdb_test "continue" \
!   "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::bar(\\(int\\) const|) \\(this=$hex, arg=15\\) at .*method\\.cc:44\r\n44\[\t \]*return arg \\+ 2 \\* x;" \
    "continue to A::bar"
  
  # Check ability to access this-relative stuff.
--- 96,102 ----
    "Breakpoint \[0-9\]* at $hex.*file .*method.cc, line 44\\."
  
  gdb_test "continue" \
!   "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::bar(|\\(int\\) const| const) \\(this=$hex, arg=15\\) at .*method\\.cc:44\r\n44\[\t \]*return arg \\+ 2 \\* x;" \
    "continue to A::bar"
  
  # Check ability to access this-relative stuff.



More information about the Gdb-patches mailing list