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/gdb.c++/local.exp: accept more nested types


This patch updates local.exp to track an improvement in gdb.
In a configuration with gcc HEAD -gstabs+, gdb prints nested types
as "InnerLocal::NestedInnerLocal" instead of just "NestedInnerLocal".
This output is okay.

I tested this on my native i686-pc-linux-gnu test bed
with 6 gcc's, both -gdwarf-2 and -gstabs+.

I'm committing this now.

Michael C

2002-05-27  Michael Chastain  <mec@shout.net>

	* gdb.c++/local.exp: Accept more nested types in output.

Index: gdb.c++/local.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/local.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 local.exp
*** gdb.c++/local.exp	23 Apr 2002 05:17:57 -0000	1.8
--- gdb.c++/local.exp	27 May 2002 17:54:30 -0000
*************** gdb_expect {
*** 124,135 ****
  # Pattern 1:
  # PASS
  #   dwarf-2
! #     2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
  #
  # Pattern 2:
  # PASS
  #   stabs+
! #     2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
  #
  # Pattern 3:
  # Old hppa pattern.
--- 124,135 ----
  # Pattern 1:
  # PASS
  #   dwarf-2
! #     2.95.3, 2.96-rh, 3.0.4, 3.1, gcc-3_1-branch, HEAD
  #
  # Pattern 2:
  # PASS
  #   stabs+
! #     2.95.3, 2.96-rh, 3.0.4, 3.1, gcc-3_1-branch, HEAD
  #
  # Pattern 3:
  # Old hppa pattern.
*************** gdb_expect {
*** 137,148 ****
  # Pattern 4:
  # Old hppa pattern.
  #
! # chastain 2002-04-08
  
  send_gdb "ptype InnerLocal\n"
  gdb_expect {
!   -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\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\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 \]*NestedInnerLocal nest1;\[\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\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 \]*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 (old HP aCC)" }
    -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 (old HP aCC)" }
    -re ".*$gdb_prompt $"   {  fail "ptype InnerLocal" }
--- 137,148 ----
  # Pattern 4:
  # Old hppa pattern.
  #
! # chastain 2002-05-27
  
  send_gdb "ptype InnerLocal\n"
  gdb_expect {
!   -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\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 1)" }
!   -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\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\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 2)" }
    -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 (old HP aCC)" }
    -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 (old HP aCC)" }
    -re ".*$gdb_prompt $"   {  fail "ptype InnerLocal" }


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