From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18675 invoked by alias); 27 May 2002 17:58:48 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18648 invoked from network); 27 May 2002 17:58:44 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 27 May 2002 17:58:44 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id g4RHwhY21911 for gdb-patches@sources.redhat.com; Mon, 27 May 2002 12:58:43 -0500 Date: Mon, 27 May 2002 11:07:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200205271758.g4RHwhY21911@duracef.shout.net> To: gdb-patches@sources.redhat.com Subject: [patch] testsuite/gdb.c++/local.exp: accept more nested types X-SW-Source: 2002-05/txt/msg00941.txt.bz2 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 * 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" }