From: Fred Fish <fnf@fred.ninemoons.com>
To: gdb-patches@sources.redhat.com
Cc: fnf@redhat.com
Subject: [RFC] const qualifiers in gdb.c++/method.exp
Date: Tue, 08 Jan 2002 09:47:00 -0000 [thread overview]
Message-ID: <200201081746.g08Hk6R01263@fred.ninemoons.com> (raw)
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 <fnf@redhat.com>
* 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 $" {
next reply other threads:[~2002-01-08 17:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-08 9:47 Fred Fish [this message]
2002-01-09 8:53 Michael Elizabeth Chastain
2002-01-09 10:52 ` Daniel Jacobowitz
2002-01-10 7:07 Michael Elizabeth Chastain
2002-01-10 11:59 ` Daniel Jacobowitz
2002-01-11 5:13 Michael Elizabeth Chastain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200201081746.g08Hk6R01263@fred.ninemoons.com \
--to=fnf@fred.ninemoons.com \
--cc=fnf@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox