From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25254 invoked by alias); 8 Jan 2002 17:47:39 -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 25005 invoked from network); 8 Jan 2002 17:47:33 -0000 Received: from unknown (HELO fred.ninemoons.com) (64.232.230.104) by sources.redhat.com with SMTP; 8 Jan 2002 17:47:33 -0000 Received: (from fnf@localhost) by fred.ninemoons.com (8.11.6/8.11.6) id g08Hk6R01263; Tue, 8 Jan 2002 10:46:06 -0700 From: Fred Fish Message-Id: <200201081746.g08Hk6R01263@fred.ninemoons.com> Subject: [RFC] const qualifiers in gdb.c++/method.exp To: gdb-patches@sources.redhat.com Date: Tue, 08 Jan 2002 09:47:00 -0000 Cc: fnf@redhat.com Reply-To: fnf@redhat.com X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-01/txt/msg00136.txt.bz2 The current testsuite has some C++ failures that are due simply to not accepting const in some cases. I'm not familiar enough with C++ to know whether or not the const qualifiers are correct or not, so it would be great if a more C++ literate developer could review these changes and see if they are reasonable or not. Thanks! -Fred 2002-01-08 Fred Fish * gdb.c++/method.exp: Optionally accept some const qualifiers for: "print this (in foo)" "print this (in bar)" "print this in getFunky" "ptype A" Index: gdb.c++/method.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/method.exp,v retrieving revision 1.3 diff -u -p -r1.3 method.exp --- method.exp 2001/12/07 22:02:23 1.3 +++ method.exp 2002/01/08 17:40:38 @@ -103,7 +103,7 @@ gdb_expect { send_gdb "print this\n" gdb_expect { - -re "\\$\[0-9\]* = \\(A \\*\\) $hex\r\n$gdb_prompt $" { + -re "\\$\[0-9\]* = \\(A \\*( const)?\\) $hex\r\n$gdb_prompt $" { pass "print this (in foo)" } -re ".*$gdb_prompt $" { fail "print this (in foo)" } @@ -154,7 +154,7 @@ gdb_expect { pass "print this (in bar)" } } - -re "\\$\[0-9\]* = \\(A \\*\\) $hex\r\n$gdb_prompt $" { + -re "\\$\[0-9\]* = \\((const )?A \\*( const)?\\) $hex\r\n$gdb_prompt $" { global gcc_compiled if {$gcc_compiled} { pass "print this (in bar)" @@ -203,7 +203,7 @@ gdb_expect { send_gdb "print this\n" gdb_expect { - -re "\\$\[0-9\]* = \\(funk \\*\\) $hex\r\n$gdb_prompt $" { + -re "\\$\[0-9\]* = \\(funk \\*( const)?\\) $hex\r\n$gdb_prompt $" { pass "print this in getFunky" } -re ".*$gdb_prompt $" { fail "print this in getfunky" } @@ -226,7 +226,7 @@ gdb_expect { send_gdb "ptype A\n" gdb_expect { - -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*A & operator=\\(A const ?&\\);\r\n\[ \]*A\\(A const ?&\\);\r\n\[ \]*A\\((void|)\\);\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) (const volatile|volatile const);\r\n\}\r\n$gdb_prompt $" { + -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*A & operator=\\(A const ?&\\);\r\n\[ \]*A\\((A const|const A) ?&\\);\r\n\[ \]*A\\((void|)\\);\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) (const volatile|volatile const);\r\n\}\r\n$gdb_prompt $" { pass "ptype A" } -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\);\r\n\[ \]*int qux\\(int, float\\) const;\r\n\}\r\n$gdb_prompt $" {