This is the mail archive of the gdb-patches@sourceware.cygnus.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]

gdb testsuite fixes


This patch (along with some compiler work) fixes all of the unexpected
failures in gdb.c++ for dwarf2 debugging, except for the annota2 fails.
Same results with stabs.

1999-11-24  Jason Merrill  <jason@casey.cygnus.com>

	* gdb.base/condbreak.exp: Add missing '$gdb_prompt $'.

	* gdb.c++/local.exp: Be more flexible in recognizing local class
	name mangling.  Don't allow horribly truncated method names.
	* gdb.c++/derivation.exp: Expect protected inheritance.
	* gdb.c++/inherit.exp: Be more flexible in recognizing vbase pointers.
	* gdb.c++/virtfunc.exp: Likewise.
	* gdb.c++/classes.exp: Likewise.  Don't require the enclosing scope
	when printing a nested enum.

Index: gdb.base/condbreak.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/condbreak.exp,v
retrieving revision 1.8
diff -c -p -r1.8 condbreak.exp
*** gdb.base/condbreak.exp	1999/11/02 23:12:22	1.8
--- gdb.base/condbreak.exp	1999/11/24 09:50:06
*************** gdb_test "continue" "Continuing\\..*Brea
*** 182,191 ****
  # Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior.
  send_gdb "continue\n"
  gdb_expect {
!     -re  "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*" {
  	pass "run until breakpoint at marker1"
      }
!     -re  "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*" {
  	xfail "run until breakpoint at marker1"
      }
      -re "$gdb_prompt $" {
--- 182,191 ----
  # Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior.
  send_gdb "continue\n"
  gdb_expect {
!     -re  "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*$gdb_prompt $" {
  	pass "run until breakpoint at marker1"
      }
!     -re  "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile:4\[38\].*4\[38\]\[\t \]+.*$gdb_prompt $" {
  	xfail "run until breakpoint at marker1"
      }
      -re "$gdb_prompt $" {
Index: gdb.c++/classes.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.c++/classes.exp,v
retrieving revision 1.30
diff -c -p -r1.30 classes.exp
*** gdb.c++/classes.exp	1999/09/07 23:19:44	1.30
--- gdb.c++/classes.exp	1999/11/24 09:50:07
***************
*** 1,4 ****
! # Copyright (C) 1992, 1994, 1995, 1997 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 (C) 1992, 1994, 1995, 1997, 1999 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
*************** proc test_ptype_class_objects {} {
*** 328,337 ****
      # for now, but with a FIXME.  At some future point, gdb should use a
      # portable representation for the virtual table constructs.
  
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vB\n"
      gdb_expect {
! 	-re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const &\\);${ws}vB\\(int, vB const &\\);${ws}vB\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    setup_xfail "*-*-*"
  	    fail "ptype class vB (FIXME: non-portable virtual table constructs)"
  	}
--- 328,340 ----
      # for now, but with a FIXME.  At some future point, gdb should use a
      # portable representation for the virtual table constructs.
  
+     # The format of a g++ virtual base pointer.
+     set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
+ 
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vB\n"
      gdb_expect {
! 	-re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*${vbptr}vA;${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const &\\);${ws}vB\\(int, vB const &\\);${ws}vB\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    setup_xfail "*-*-*"
  	    fail "ptype class vB (FIXME: non-portable virtual table constructs)"
  	}
*************** proc test_ptype_class_objects {} {
*** 358,364 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vC\n"
      gdb_expect {
! 	-re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const &\\);${ws}vC\\(int, vC const &\\);${ws}vC\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    setup_xfail "*-*-*"
  	    fail "ptype class vC (FIXME: non-portable virtual table constructs)"
  	}
--- 361,367 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vC\n"
      gdb_expect {
! 	-re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*${vbptr}vA;${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const &\\);${ws}vC\\(int, vC const &\\);${ws}vC\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    setup_xfail "*-*-*"
  	    fail "ptype class vC (FIXME: non-portable virtual table constructs)"
  	}
*************** proc test_ptype_class_objects {} {
*** 385,391 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vD\n"
      gdb_expect {
! 	-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*_vb.vC;${ws}vB \\*_vb.vB;${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const &\\);${ws}vD\\(int, vD const &\\);${ws}vD\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    setup_xfail "*-*-*"
  	    fail "ptype class vD (FIXME: non-portable virtual table constructs)"
  	}
--- 388,394 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vD\n"
      gdb_expect {
! 	-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const &\\);${ws}vD\\(int, vD const &\\);${ws}vD\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    setup_xfail "*-*-*"
  	    fail "ptype class vD (FIXME: non-portable virtual table constructs)"
  	}
*************** proc test_ptype_class_objects {} {
*** 412,418 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vE\n"
      gdb_expect {
! 	-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*_vb.vD;${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const &\\);${ws}vE\\(int, vE const &\\);${ws}vE\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    setup_xfail "*-*-*"
  	    fail "ptype class vE (FIXME: non-portable virtual table constructs)"
  	}
--- 415,421 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vE\n"
      gdb_expect {
! 	-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const &\\);${ws}vE\\(int, vE const &\\);${ws}vE\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    setup_xfail "*-*-*"
  	    fail "ptype class vE (FIXME: non-portable virtual table constructs)"
  	}
*************** proc test_ptype_class_objects {} {
*** 456,462 ****
          -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;\r\n${ws}Foo\\(int, int\\);${ws}int operator!.void.;${ws}operator int.void.;${ws}int times.int.;$nl\}$nl$gdb_prompt $" {
              pass "ptype class Foo(aCC)"
          }
! 	-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const &\\);${ws}Foo\\(Foo const &\\);${ws}Foo\\(int, int\\);${ws}int operator!\\(void\\);${ws}int operator int\\(void\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype class Foo"
  	}
  	-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;((${ws}Foo & operator=\\(Foo const &\\);)|(${ws}Foo\\(Foo const &\\);)|(${ws}Foo\\(int, int\\);)|(${ws}int operator!\\(void\\);)|(${ws}int operator int\\(void\\);)|(${ws}int times\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
--- 459,465 ----
          -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;\r\n${ws}Foo\\(int, int\\);${ws}int operator!.void.;${ws}operator int.void.;${ws}int times.int.;$nl\}$nl$gdb_prompt $" {
              pass "ptype class Foo(aCC)"
          }
! 	-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const &\\);${ws}Foo\\(Foo const &\\);${ws}Foo\\(int, int\\);${ws}int operator!\\(void\\);${ws}operator int\\(void\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype class Foo"
  	}
  	-re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;((${ws}Foo & operator=\\(Foo const &\\);)|(${ws}Foo\\(Foo const &\\);)|(${ws}Foo\\(int, int\\);)|(${ws}int operator!\\(void\\);)|(${ws}int operator int\\(void\\);)|(${ws}int times\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
*************** gdb_expect {   
*** 828,838 ****
  }
  
  # ptype on the enum member
! # The second success case is a little dubious, but it's not clear what
  # ought to be required of a ptype on a private enum... -sts 19990324
  send_gdb "ptype obj_with_enum.priv_enum\n"   
  gdb_expect {   
     -re "type = enum ClassWithEnum::PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
     -re "type = enum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
     -re "$gdb_prompt $"                     { fail "ptype obj_with_enum.priv_enum" }
     timeout                             { fail "(timeout) ptype obj_with_enum.priv_enum" }
--- 831,842 ----
  }
  
  # ptype on the enum member
! # The third success case is a little dubious, but it's not clear what
  # ought to be required of a ptype on a private enum... -sts 19990324
  send_gdb "ptype obj_with_enum.priv_enum\n"   
  gdb_expect {   
     -re "type = enum ClassWithEnum::PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
+    -re "type = enum PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
     -re "type = enum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
     -re "$gdb_prompt $"                     { fail "ptype obj_with_enum.priv_enum" }
     timeout                             { fail "(timeout) ptype obj_with_enum.priv_enum" }
Index: gdb.c++/derivation.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.c++/derivation.exp,v
retrieving revision 1.8
diff -c -p -r1.8 derivation.exp
*** gdb.c++/derivation.exp	1999/11/11 05:22:52	1.8
--- gdb.c++/derivation.exp	1999/11/24 09:50:07
*************** gdb_expect {
*** 120,126 ****
    if {$gcc_compiled} then {
        send_gdb "ptype d_instance\n"
        gdb_expect {
! 	  -re "type = class D : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const &\\);\[\r\n\t ]+D\\(D const &\\);\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $"  { pass "ptype d_instance" }
            -re "type = class D : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $"  { pass "ptype d_instance" }
  	  -re ".*$gdb_prompt $"   {  fail "ptype d_instance" }
  	  timeout             { fail "(timeout) ptype d_instance" }
--- 120,126 ----
    if {$gcc_compiled} then {
        send_gdb "ptype d_instance\n"
        gdb_expect {
! 	  -re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const &\\);\[\r\n\t ]+D\\(D const &\\);\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $"  { pass "ptype d_instance" }
            -re "type = class D : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $"  { pass "ptype d_instance" }
  	  -re ".*$gdb_prompt $"   {  fail "ptype d_instance" }
  	  timeout             { fail "(timeout) ptype d_instance" }
*************** gdb_expect {
*** 150,156 ****
    if {$gcc_compiled} {
        send_gdb "ptype e_instance\n"
        gdb_expect {
! 	  -re "type = class E : public A, private B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const &\\);\[\r\n\t ]+E\\(E const &\\);\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $"  { pass "ptype e_instance" }
            -re "type = class E : public A, private B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $"  { pass "ptype e_instance" }
  	  -re ".*$gdb_prompt $"   {  fail "ptype e_instance" }
  	  timeout             { fail "(timeout) ptype e_instance" }
--- 150,156 ----
    if {$gcc_compiled} {
        send_gdb "ptype e_instance\n"
        gdb_expect {
! 	  -re "type = class E : public A, private B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const &\\);\[\r\n\t ]+E\\(E const &\\);\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $"  { pass "ptype e_instance" }
            -re "type = class E : public A, private B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t \]+E\\(void\\);\r\n\[\t \]*int efoo\\(void\\);\r\n\[\t \]*int foo\\(void\\);\r\n\}.*$gdb_prompt $"  { pass "ptype e_instance" }
  	  -re ".*$gdb_prompt $"   {  fail "ptype e_instance" }
  	  timeout             { fail "(timeout) ptype e_instance" }
Index: gdb.c++/inherit.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.c++/inherit.exp,v
retrieving revision 1.28
diff -c -p -r1.28 inherit.exp
*** gdb.c++/inherit.exp	1999/09/07 23:19:44	1.28
--- gdb.c++/inherit.exp	1999/11/24 09:50:08
***************
*** 1,4 ****
! # Copyright (C) 1992, 1993, 1994, 1997 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 (C) 1992, 1993, 1994, 1997, 1999 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
***************
*** 22,27 ****
--- 22,30 ----
  set ws "\[\r\n\t \]+"
  set nl "\[\r\n\]+"
  
+ # The format of a g++ virtual base pointer.
+ set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
+ 
  if $tracelevel then {
  	strace $tracelevel
  }
*************** proc test_ptype_vi {} {
*** 575,580 ****
--- 578,584 ----
      global gdb_prompt
      global ws
      global nl
+     global vbptr
  
      # This class does not use any C++-specific features, so it's fine for
      # it to print as "struct".
*************** proc test_ptype_vi {} {
*** 621,627 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype vB\n"
      gdb_expect {
! 	-re "ptype vB${nl}type = class vB : public virtual vA \{$nl  private:${ws}vA \[*\]+_vb\[\\\$\.\]+vA;$nl  public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
  	    pass "ptype vB"
  	}
  	-re "ptype vB${nl}type = class vB : public virtual vA \{$nl  public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
--- 625,631 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype vB\n"
      gdb_expect {
! 	-re "ptype vB${nl}type = class vB : public virtual vA \{$nl  private:${ws}vA \\*${vbptr}vA;$nl  public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
  	    pass "ptype vB"
  	}
  	-re "ptype vB${nl}type = class vB : public virtual vA \{$nl  public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
*************** proc test_ptype_vi {} {
*** 634,640 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vB\n"
      gdb_expect {
! 	-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
  	    pass "ptype class vB"
  	}
  	-re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
--- 638,644 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vB\n"
      gdb_expect {
! 	-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
  	    pass "ptype class vB"
  	}
  	-re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
*************** proc test_ptype_vi {} {
*** 647,653 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype g_vB\n"
      gdb_expect {
! 	-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
  	    pass "ptype g_vB"
  	}
  	-re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
--- 651,657 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype g_vB\n"
      gdb_expect {
! 	-re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
  	    pass "ptype g_vB"
  	}
  	-re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
*************** proc test_ptype_vi {} {
*** 660,666 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype vC\n"
      gdb_expect {
! 	-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
              pass "ptype vC"
  	}
  	-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
--- 664,670 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype vC\n"
      gdb_expect {
! 	-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
              pass "ptype vC"
  	}
  	-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
*************** proc test_ptype_vi {} {
*** 673,679 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vC\n"
      gdb_expect {
! 	-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
              pass "ptype class vC"
  	}
  	-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
--- 677,683 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vC\n"
      gdb_expect {
! 	-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
              pass "ptype class vC"
  	}
  	-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
*************** proc test_ptype_vi {} {
*** 686,692 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype g_vC\n"
      gdb_expect {
! 	-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \[*\]+_vb\[\\\$\.\]vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
              pass "ptype g_vC"
  	}
  	-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
--- 690,696 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype g_vC\n"
      gdb_expect {
! 	-re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
              pass "ptype g_vC"
  	}
  	-re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
*************** proc test_print_svi_classes {} {
*** 706,711 ****
--- 710,716 ----
      global hex
      global decimal
      global nl
+     global vbptr
  
      # Print all members of g_vA.
  
*************** proc test_print_svi_classes {} {
*** 722,728 ****
  	-re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, __vfp = $hex\}$nl$gdb_prompt $" {
  	    pass "print g_vB (aCC)"
  	}
! 	-re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vb\[\\\$\.\]vA = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
  	    pass "print g_vB"
  	}
  	-re ".*invalid address 0x0.*$gdb_prompt $" {
--- 727,733 ----
  	-re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, __vfp = $hex\}$nl$gdb_prompt $" {
  	    pass "print g_vB (aCC)"
  	}
! 	-re ".* = \{\<vA\> = \{va = 3, vx = 4\}, ${vbptr}vA = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
  	    pass "print g_vB"
  	}
  	-re ".*invalid address 0x0.*$gdb_prompt $" {
*************** proc test_print_svi_classes {} {
*** 746,752 ****
  	-re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, __vfp = $hex\}$nl$gdb_prompt $" {
  	    pass "print g_vC (aCC)"
  	}
! 	-re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vb\[\\\$\.\]vA = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
  	    pass "print g_vC"
  	}
  	-re ".*$gdb_prompt $" { fail "print g_vC" }
--- 751,757 ----
  	-re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, __vfp = $hex\}$nl$gdb_prompt $" {
  	    pass "print g_vC (aCC)"
  	}
! 	-re ".* = \{\<vA\> = \{va = 7, vx = 8\}, ${vbptr}vA = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
  	    pass "print g_vC"
  	}
  	-re ".*$gdb_prompt $" { fail "print g_vC" }
*************** proc test_ptype_mvi {} {
*** 836,846 ****
      global gdb_prompt
      global ws
      global nl
  
      setup_xfail_format "DWARF 1"
      send_gdb "ptype vD\n"
      gdb_expect {
! 	-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype vD"
  	}
          -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
--- 841,852 ----
      global gdb_prompt
      global ws
      global nl
+     global vbptr
  
      setup_xfail_format "DWARF 1"
      send_gdb "ptype vD\n"
      gdb_expect {
! 	-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype vD"
  	}
          -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
*************** proc test_ptype_mvi {} {
*** 853,859 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vD\n"
      gdb_expect {
! 	-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype class vD"
  	}
  	-re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
--- 859,865 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vD\n"
      gdb_expect {
! 	-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype class vD"
  	}
  	-re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
*************** proc test_ptype_mvi {} {
*** 866,872 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype g_vD\n"
      gdb_expect {
! 	-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \[*\]+_vb\[\\\$\.\]vC;${ws}vB \[*\]+_vb\[\\\$\.\]vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype g_vD"
  	}
  	-re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
--- 872,878 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype g_vD\n"
      gdb_expect {
! 	-re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype g_vD"
  	}
  	-re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
*************** proc test_ptype_mvi {} {
*** 879,885 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype vE\n"
      gdb_expect {
! 	-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype vE"
  	}
  	-re ".*class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
--- 885,891 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype vE\n"
      gdb_expect {
! 	-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype vE"
  	}
  	-re ".*class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
*************** proc test_ptype_mvi {} {
*** 892,898 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vE\n"
      gdb_expect {
! 	-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype class vE"
  	}
  	-re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
--- 898,904 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype class vE\n"
      gdb_expect {
! 	-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype class vE"
  	}
  	-re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
*************** proc test_ptype_mvi {} {
*** 905,911 ****
      setup_xfail_format "DWARF 1"
      send_gdb "ptype g_vE\n"
      gdb_expect {
! 	-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \[*\]+_vb\[\\\$\.\]vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype g_vE"
  	}
  	-re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
--- 911,917 ----
      setup_xfail_format "DWARF 1"
      send_gdb "ptype g_vE\n"
      gdb_expect {
! 	-re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
  	    pass "ptype g_vE"
  	}
  	-re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
*************** proc test_print_mvi_classes {} {
*** 925,930 ****
--- 931,937 ----
      global hex
      global decimal
      global nl
+     global vbptr
  
      # Print all members of g_vD.
  
*************** proc test_print_mvi_classes {} {
*** 937,943 ****
  	-re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, __vfp = $hex\}, \<class vC\> = \{vc = 23, vx = 24, __vfp = $hex\}, vd = 25, vx = 26, __vfp = $hex\}$nl$gdb_prompt $" {
  	    pass "print g_vD (aCC)"
  	}
! 	-re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vb\[\\\$\.\]vA = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vb\[\\\$\.\]vA = $hex, vc = 23, vx = 24\}, _vb\[\\\$\.\]vC = $hex, _vb\[\\\$\.\]vB = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
  	    pass "print g_vD"
  	}
  	-re ".*invalid address 0x0.*$gdb_prompt $" {
--- 944,950 ----
  	-re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, __vfp = $hex\}, \<class vC\> = \{vc = 23, vx = 24, __vfp = $hex\}, vd = 25, vx = 26, __vfp = $hex\}$nl$gdb_prompt $" {
  	    pass "print g_vD (aCC)"
  	}
! 	-re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, ${vbptr}vA = $hex, vb = 21, vx = 22\}, \<vC\> = \{${vbptr}vA = $hex, vc = 23, vx = 24\}, ${vbptr}vC = $hex, ${vbptr}vB = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
  	    pass "print g_vD"
  	}
  	-re ".*invalid address 0x0.*$gdb_prompt $" {
*************** proc test_print_mvi_classes {} {
*** 961,967 ****
  	-re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, __vfp = $hex\}, \<class vC\> = \{vc = 0, vx = 0, __vfp = $hex\}, vd = 0, vx = 0, __vfp = $hex\}, ve = 27, vx = 28, __vfp = $hex\}$nl$gdb_prompt $" {
  	    pass "print g_vE (aCC)"
  	}
! 	-re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, _vb\[\\\$\.\]vA = $hex, vb = 0, vx = 0\}, \<vC\> = \{_vb\[\\\$\.\]vA = $hex, vc = 0, vx = 0\}, _vb\[\\\$\.\]vC = $hex, _vb\[\\\$\.\]vB = $hex, vd = 0, vx = 0\}, _vb\[\\\$\.\]vD = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
  	    pass "print g_vE"
  	}
  	-re ".*$gdb_prompt $" { fail "print g_vE" }
--- 968,974 ----
  	-re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, __vfp = $hex\}, \<class vC\> = \{vc = 0, vx = 0, __vfp = $hex\}, vd = 0, vx = 0, __vfp = $hex\}, ve = 27, vx = 28, __vfp = $hex\}$nl$gdb_prompt $" {
  	    pass "print g_vE (aCC)"
  	}
! 	-re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, ${vbptr}vA = $hex, vb = 0, vx = 0\}, \<vC\> = \{${vbptr}vA = $hex, vc = 0, vx = 0\}, ${vbptr}vC = $hex, ${vbptr}vB = $hex, vd = 0, vx = 0\}, ${vbptr}vD = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
  	    pass "print g_vE"
  	}
  	-re ".*$gdb_prompt $" { fail "print g_vE" }
Index: gdb.c++/local.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.c++/local.exp,v
retrieving revision 1.5
diff -c -p -r1.5 local.exp
*** gdb.c++/local.exp	1999/09/07 23:19:44	1.5
--- gdb.c++/local.exp	1999/11/24 09:50:08
*************** if {$gcc_compiled} then  {
*** 85,96 ****
  setup_xfail "*-*-*"
  }
  
  send_gdb "ptype Local\n"
  gdb_expect {
      -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 \]*\}\[\t \]*\\(Local at.*local\\.cc:10\\).*$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 \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype Local (incorrect line number?)" }
!     -re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*Local & Local::operator=\\(foobar__Fi___0::Local const &\\);\r\n\[\t \]*Local::Local\\(foobar__Fi___0::Local const &\\);\r\n\[\t \]*Local::Local\\(void\\);\r\n\[\t \]*char Local::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 \]*Local & Local const &\\);\r\n\[\t \]*Local const &\\);\r\n\[\t \]*Local\\(void\\);\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\}\[\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 $" { pass "ptype Local (aCC)" }
      -re ".*$gdb_prompt $"   {  fail "ptype Local" }
      timeout             { fail "(timeout) ptype Local" }
--- 85,99 ----
  setup_xfail "*-*-*"
  }
  
+ # Local classes in g++ get names like "main.1::InnerLocal", just like local
+ # static variables.  Some targets use "___" instead of ".".
+ set sep "(\[.\]|___)\[0-9\]"
+ 
  send_gdb "ptype Local\n"
  gdb_expect {
      -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 \]*\}\[\t \]*\\(Local at.*local\\.cc:10\\).*$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 \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype Local (incorrect line number?)" }
!     -re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\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 $" { pass "ptype Local (aCC)" }
      -re ".*$gdb_prompt $"   {  fail "ptype Local" }
      timeout             { fail "(timeout) ptype Local" }
*************** gdb_expect {
*** 111,118 ****
      -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\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
      -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
      -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 HP aCC" }
!     -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*NestedInnerLocal nest1;\r\n\r\n\[\t \]*InnerLocal & InnerLocal::operator=\\(main___0::InnerLocal const &\\);\r\n\[\t \]*InnerLocal::InnerLocal\\(main___0::InnerLocal const &\\);\r\n\[\t \]*InnerLocal::InnerLocal\\(void\\);\r\n\[\t \]*int InnerLocal::il_foo\\(unsigned char const &\\);\r\n\*\}\r\n*.*$gdb_prompt $" { pass "ptype InnerLocal" }
!     -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*NestedInnerLocal nest1;\r\n\r\n\[\t \]*InnerLocal & InnerLocal const &\\);\r\n\[\t \]*InnerLocal const &\\);\r\n\[\t \]*InnerLocal\\(void\\);\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*.*$gdb_prompt $" { pass "ptype InnerLocal" }
      -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 (aCC)" }
      -re ".*$gdb_prompt $"   {  fail "ptype InnerLocal" }
      timeout             { fail "(timeout) ptype InnerLocal" }
--- 114,120 ----
      -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\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
      -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(const unsigned char &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype InnerLocal (incorrect line number?" }
      -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 HP aCC" }
!     -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*NestedInnerLocal nest1;\r\n\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\*\}\r\n*.*$gdb_prompt $" { pass "ptype InnerLocal" }
      -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 (aCC)" }
      -re ".*$gdb_prompt $"   {  fail "ptype InnerLocal" }
      timeout             { fail "(timeout) ptype InnerLocal" }
*************** send_gdb "ptype NestedInnerLocal\n"
*** 122,129 ****
  gdb_expect {
      -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:44\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
      -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal (incorrect line number?)" }
!     -re "type = class NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*NestedInnerLocal & InnerLocal::NestedInnerLocal::operator=\\(main___1::InnerLocal::NestedInnerLocal const &\\);\r\n\[\t \]*InnerLocal::NestedInnerLocal::NestedInnerLocal\\(main___1::InnerLocal::NestedInnerLocal const &\\);\r\n\[\t \]*InnerLocal::NestedInnerLocal::NestedInnerLocal\\(void\\);\r\n\[\t \]*int InnerLocal::NestedInnerLocal::nil_foo\\(int\\);\r\n\}\r\n*.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
!     -re "type = class NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*NestedInnerLocal & NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal\\(void\\);\r\n\[\t \]*int nil_foo\\(int\\);\r\n\[\t \]*\}\r\n*.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
      -re "No symbol.*in current context.*$gdb_prompt $" { pass "ptype NestedInnerLocal (known aCC limitation)" }
      -re ".*$gdb_prompt $"   {  fail "ptype NestedInnerLocal" }
      timeout             { fail "(timeout) ptype NestedInnerLocal" }
--- 124,130 ----
  gdb_expect {
      -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:44\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
      -re "type = class InnerLocal::NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*.int nil_foo\\(int\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\).*$gdb_prompt $" { pass "ptype NestedInnerLocal (incorrect line number?)" }
!     -re "type = class NestedInnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*int nil;\r\n\r\n\[\t \]*NestedInnerLocal & operator=\\((main${sep}::InnerLocal::|)NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal\\((main${sep}::InnerLocal::|)NestedInnerLocal const &\\);\r\n\[\t \]*NestedInnerLocal\\(void\\);\r\n\[\t \]*int nil_foo\\(int\\);\r\n\}\r\n*.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
      -re "No symbol.*in current context.*$gdb_prompt $" { pass "ptype NestedInnerLocal (known aCC limitation)" }
      -re ".*$gdb_prompt $"   {  fail "ptype NestedInnerLocal" }
      timeout             { fail "(timeout) ptype NestedInnerLocal" }
Index: gdb.c++/virtfunc.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.c++/virtfunc.exp,v
retrieving revision 1.30
diff -c -p -r1.30 virtfunc.exp
*** gdb.c++/virtfunc.exp	1999/09/07 23:19:44	1.30
--- gdb.c++/virtfunc.exp	1999/11/24 09:50:08
*************** proc test_ptype_of_classes {} {
*** 129,146 ****
  	}
      }
  
      send_gdb "ptype A\n"
      gdb_expect {
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb\[\\\$\.\]+V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype A"
  	}
          -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype A (aCC)"
          }
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb\[\\\$\.\]+V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype A (obsolescent gcc or gdb)"
  	}
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
  	    # This happens because the type is defined only after it is
  	    # too late.
  	    fail "ptype A (known failure with gcc cygnus-2.4.5-930417)"
--- 129,149 ----
  	}
      }
  
+     # The format of a g++ virtual base pointer.
+     set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
+ 
      send_gdb "ptype A\n"
      gdb_expect {
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype A"
  	}
          -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype A (aCC)"
          }
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype A (obsolescent gcc or gdb)"
  	}
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
  	    # This happens because the type is defined only after it is
  	    # too late.
  	    fail "ptype A (known failure with gcc cygnus-2.4.5-930417)"
*************** proc test_ptype_of_classes {} {
*** 176,188 ****
  
      send_gdb "ptype C\n"
      gdb_expect {
! 	-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype C"
  	}
          -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
              pass "ptype C (aCC)"
          }
! 	-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype C (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 179,191 ----
  
      send_gdb "ptype C\n"
      gdb_expect {
! 	-re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype C"
  	}
          -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
              pass "ptype C (aCC)"
          }
! 	-re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype C (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 214,226 ****
  
      send_gdb "ptype D\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype D"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype D (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype D (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 217,229 ----
  
      send_gdb "ptype D\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype D"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype D (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype D (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 252,264 ****
  
      send_gdb "ptype dd\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype dd"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype dd (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype dd (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 255,267 ----
  
      send_gdb "ptype dd\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype dd"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype dd (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype dd (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 271,283 ****
  
      send_gdb "ptype ppd\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype ppd"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype ppd (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype ppd (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 274,286 ----
  
      send_gdb "ptype ppd\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype ppd"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype ppd (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype ppd (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 309,321 ****
  
      send_gdb "ptype a\n"
      gdb_expect {
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype a"
  	}
          -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype a (aCC)"
          }
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype a (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 312,324 ----
  
      send_gdb "ptype a\n"
      gdb_expect {
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype a"
  	}
          -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype a (aCC)"
          }
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype a (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 347,359 ****
  
      send_gdb "ptype c\n"
      gdb_expect {
! 	-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype c"
  	}
          -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
              pass "ptype c (aCC)"
          }
! 	-re "type = class C : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype c (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 350,362 ----
  
      send_gdb "ptype c\n"
      gdb_expect {
! 	-re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const &\\);${ws}C\\(int, C const &\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype c"
  	}
          -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
              pass "ptype c (aCC)"
          }
! 	-re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const &\\);)|(${ws}C\\(int, C const &\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype c (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 366,378 ****
  
      send_gdb "ptype d\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype d"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype d (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype d (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 369,381 ----
  
      send_gdb "ptype d\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype d"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\}$nl$gdb_prompt $" {
              pass "ptype d (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\}$nl$gdb_prompt $" {
  	    pass "ptype d (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 442,454 ****
  
      send_gdb "ptype pAa\n"
      gdb_expect {
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pAa"
  	}
          -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype pAa (aCC)"
          }
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pAa (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 445,457 ----
  
      send_gdb "ptype pAa\n"
      gdb_expect {
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pAa"
  	}
          -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype pAa (aCC)"
          }
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pAa (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 461,473 ****
  
      send_gdb "ptype pAe\n"
      gdb_expect {
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pAe"
  	}
          -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype pAe (aCC)"
  	}
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pAe (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 464,476 ----
  
      send_gdb "ptype pAe\n"
      gdb_expect {
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const &\\);${ws}A\\(int, A const &\\);${ws}A\\(int\\);${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pAe"
  	}
          -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype pAe (aCC)"
  	}
! 	-re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const &\\);)|(${ws}A\\(int, A const &\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pAe (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 499,511 ****
  
      send_gdb "ptype pDd\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pDd"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype pDd (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pDd (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 502,514 ----
  
      send_gdb "ptype pDd\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pDd"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype pDd (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pDd (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
*************** proc test_ptype_of_classes {} {
*** 518,530 ****
  
      send_gdb "ptype pDe\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pDe"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype pDe (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \[*\]+_vb.V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pDe (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {
--- 521,533 ----
  
      send_gdb "ptype pDe\n"
      gdb_expect {
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const &\\);${ws}D\\(int, D const &\\);${ws}D\\(int\\);${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pDe"
  	}
          -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\(void\\);${ws}virtual int vg\\(void\\);${ws}virtual int vd\\(void\\);${ws}int fd\\(void\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
              pass "ptype pDe (aCC)"
          }
! 	-re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const &\\);)|(${ws}D\\(int, D const &\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\(void\\);)|(${ws}virtual int vg\\(void\\);)|(${ws}virtual int vd\\(void\\);)|(${ws}int fd\\(void\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
  	    pass "ptype pDe (obsolescent gcc or gdb)"
  	}
  	-re ".*$gdb_prompt $" {

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