diff options
author | Michael Chastain <mec@google.com> | 2002-04-08 22:43:15 +0000 |
---|---|---|
committer | Michael Chastain <mec@google.com> | 2002-04-08 22:43:15 +0000 |
commit | 3a63e3f9b9fa675e1718de5a463fdd1eb72b863d (patch) | |
tree | 0e7d756517e7a1d8c080cf228defe60092ddb6e7 /gdb/testsuite | |
parent | a4e4e50196d9a712db4221a8d00b8e613d77336b (diff) | |
download | gdb-3a63e3f9b9fa675e1718de5a463fdd1eb72b863d.zip gdb-3a63e3f9b9fa675e1718de5a463fdd1eb72b863d.tar.gz gdb-3a63e3f9b9fa675e1718de5a463fdd1eb72b863d.tar.bz2 |
2002-04-08 Michael Chastain <mec@shout.net>
* gdb.c++/method.exp: Require "const ... A * ..." for "ptype this"
in a const method. Add some xfail and fail cases for configurations
that do not emit the "const ...".
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.c++/method.exp | 26 |
2 files changed, 29 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f398f09..1c854f2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-04-08 Michael Chastain <mec@shout.net> + + * gdb.c++/method.exp: Require "const ... A * ..." for "ptype this" + in a const method. Add some xfail and fail cases for configurations + that do not emit the "const ...". + 2002-04-07 Michael Chastain <mec@shout.net> * gdb.c++/method.exp: Use gdb_test instead of send_gdb/gdb_expect. diff --git a/gdb/testsuite/gdb.c++/method.exp b/gdb/testsuite/gdb.c++/method.exp index 2ab4e8f..3ca5cc1 100644 --- a/gdb/testsuite/gdb.c++/method.exp +++ b/gdb/testsuite/gdb.c++/method.exp @@ -107,9 +107,29 @@ gdb_test "print x" \ # Check access to this pointer -gdb_test "print this" \ - "\\$\[0-9\]* = \\((const |)(class |)A *\\* *(const|)\\) $hex" \ - "print this in A::bar" +get_debug_format + +send_gdb "print this\n" +gdb_expect { + -re "\\$\[0-9\]* = \\(const (class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" { + pass "print this in A::bar" + } + -re "\\$\[0-9\]* = \\((class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" { + # gcc versions up to 3.0.4 with -gstabs+ do not emit "const" indicators, + # so the output is "A *". It should be "const A *" or "const A * const". + setup_xfail_format "stabs" + fail "print this in A::bar (missing const)" + } + -re "\\$\[0-9\]* = \\(const (class |)\{\\.\\.\\.\} *\\* *(const|)\\) $hex\r\n$gdb_prompt $" { + # gcc versions gcc-3_1-branch%20020404 and HEAD%20020404 with -gstabs+ + # produce good stabs, but gdb prints "const class {...} *" const. + # This is PR gdb/277. + # setup_kfail "gnats:gdb/277" + fail "print this in A::bar (gnats:gdb/277)" + } + -re ".*$gdb_prompt $" { fail "print this in A::bar" } + timeout { fail "(timeout) print this in A::bar" } +} # Check again with funk::getFunky (this is the original test case # for CHFts23426); sometimes having a constructor with no arguments |