From: Daniel Jacobowitz Date: Wed, 30 Oct 2002 23:17:30 +0000 (+0000) Subject: * gdb.c++/method.exp (print this): Allow "A const". X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9db7aefe2d259ce4907f39d8ecb370dde77dfedb;p=thirdparty%2Fbinutils-gdb.git * gdb.c++/method.exp (print this): Allow "A const". * gdb.c++/templates.exp (ptype fvpchar) (print Foo::Foo): Allow consts after type names. --- diff --git a/gdb/testsuite/ChangeLog.cplus b/gdb/testsuite/ChangeLog.cplus index 3436b7340bf..cd92a3d403a 100644 --- a/gdb/testsuite/ChangeLog.cplus +++ b/gdb/testsuite/ChangeLog.cplus @@ -1,3 +1,9 @@ +2002-10-30 Daniel Jacobowitz + + * gdb.c++/method.exp (print this): Allow "A const". + * gdb.c++/templates.exp (ptype fvpchar) + (print Foo::Foo): Allow consts after type names. + 2002-10-22 David Carlton * gdb.c++/namespace.exp: Add tests involving namespaces diff --git a/gdb/testsuite/gdb.c++/method.exp b/gdb/testsuite/gdb.c++/method.exp index a085b14cdcc..d6b02a4ac36 100644 --- a/gdb/testsuite/gdb.c++/method.exp +++ b/gdb/testsuite/gdb.c++/method.exp @@ -111,7 +111,7 @@ get_debug_format send_gdb "print this\n" gdb_expect { - -re "\\$\[0-9\]* = \\(const (class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" { + -re "\\$\[0-9\]* = \\((const (class |)A|A const) *\\* *(const|)\\) $hex\r\n$gdb_prompt $" { pass "print this in A::bar" } -re "\\$\[0-9\]* = \\((class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.c++/templates.exp b/gdb/testsuite/gdb.c++/templates.exp index a6d35fcb116..75d5b644329 100644 --- a/gdb/testsuite/gdb.c++/templates.exp +++ b/gdb/testsuite/gdb.c++/templates.exp @@ -287,7 +287,7 @@ gdb_expect { send_gdb "ptype fvpchar\n" gdb_expect { - -re "type = (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" } + -re "type = (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char.* \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" } -re "$gdb_prompt $" { fail "ptype fvpchar" } timeout { fail "(timeout) ptype fvpchar" } } @@ -296,7 +296,7 @@ gdb_expect { send_gdb "print Foo::foo\n" gdb_expect { - -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo \\*, int, .*char \\*\\)\\} $hex ::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo::foo" } + -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo \\*, int, .*char \\*\\)\\} $hex ::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<(volatile char|char volatile) *>::foo" } -re "$gdb_prompt $" { fail "print Foo::foo" } timeout { fail "(timeout) print Foo::foo" } }