aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-03-03 18:48:31 +0000
committerDavid Carlton <carlton@bactrian.org>2003-03-03 18:48:31 +0000
commit6ece72dad9bbb3dda581c92d778c398e275ae7c0 (patch)
tree0e1f13583ab1d33dd4e6f3811937d1f02ce7623b /gdb
parent85ca1584136004492afd07a88af7fac1d24e2258 (diff)
downloadgdb-6ece72dad9bbb3dda581c92d778c398e275ae7c0.zip
gdb-6ece72dad9bbb3dda581c92d778c398e275ae7c0.tar.gz
gdb-6ece72dad9bbb3dda581c92d778c398e275ae7c0.tar.bz2
2003-02-28 David Carlton <carlton@math.stanford.edu>
* gdb.c++/classes.exp (test_enums): KFAIL "ptype obj_with_enum" with respect to PR c++/57. KFAIL "print (ClassWithEnum::PrivEnum) 42" with respect to PR c++/826. Create "print ('ClassWithEnum::PrivEnum') 42"; KFAIL it with respect to PR c++/57.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog9
-rw-r--r--gdb/testsuite/gdb.c++/classes.exp30
2 files changed, 35 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 21c071d..14b54f4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2003-03-03 David Carlton <carlton@math.stanford.edu>
+ * gdb.c++/classes.exp (test_enums): KFAIL "ptype obj_with_enum"
+ with respect to PR c++/57.
+ KFAIL "print (ClassWithEnum::PrivEnum) 42" with respect to PR
+ c++/826.
+ Create "print ('ClassWithEnum::PrivEnum') 42"; KFAIL it with
+ respect to PR c++/57.
+
+2003-03-03 David Carlton <carlton@math.stanford.edu>
+
* gdb.c++/templates.exp (do_tests): Convert the KFAILs with
respect to PR c++/33 into FAILs.
diff --git a/gdb/testsuite/gdb.c++/classes.exp b/gdb/testsuite/gdb.c++/classes.exp
index 70a1bb4..3f398ac 100644
--- a/gdb/testsuite/gdb.c++/classes.exp
+++ b/gdb/testsuite/gdb.c++/classes.exp
@@ -657,23 +657,45 @@ proc test_enums {} {
}
# ptype on the object
- # g++ is putting out the wrong debug info. This works with aCC
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
send_gdb "ptype obj_with_enum\n"
gdb_expect {
-re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)ClassWithEnum::PrivEnum priv_enum;\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { pass "ptype obj_with_enum" }
+ -re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)PrivEnum priv_enum;\r\n\[ \t\]*int x;.*\\}\r\n$gdb_prompt $"
+ {
+ # NOTE: carlton/2003-02-28: One could certainly argue that
+ # this output is acceptable: PrivEnum is a member of
+ # ClassWithEnum, so there's no need to explicitly qualify
+ # its name with "ClassWithEnum::". The truth, though, is
+ # that GDB is simply forgetting that PrivEnum is a member
+ # of ClassWithEnum, so we do that output for a bad reason
+ # instead of a good reason. Under stabs, we probably
+ # can't get this right; under DWARF-2, we can.
+ kfail "gdb/57" "ptype obj_with_enum"
+ }
-re "$gdb_prompt $" { fail "ptype obj_with_enum" }
timeout { fail "(timeout) ptype obj_with_enum" }
}
- # g++ is putting out the wrong debug info. This works with aCC
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
+ # We'll do this test twice, because of a parser bug: see
+ # PR gdb/826.
+
send_gdb "print (ClassWithEnum::PrivEnum) 42\n"
gdb_expect {
-re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print (ClassWithEnum::PrivEnum) 42" }
+ -re "A parse error in expression, near `42'.\r\n$gdb_prompt $"
+ { kfail "gdb/826" "print (ClassWithEnum::PrivEnum) 42" }
-re "$gdb_prompt $" { fail "print (ClassWithEnum::PrivEnum) 42" }
timeout { fail "(timeout) print (ClassWithEnum::PrivEnum) 42" }
}
+
+ send_gdb "print ('ClassWithEnum::PrivEnum') 42\n"
+ gdb_expect {
+ -re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print ('ClassWithEnum::PrivEnum') 42" }
+ -re "No symbol \"ClassWithEnum::PrivEnum\" in current context.\r\n$gdb_prompt $"
+ { kfail "gdb/57" "print ('ClassWithEnum::PrivEnum') 42" }
+ -re "$gdb_prompt $" { fail "print ('ClassWithEnum::PrivEnum') 42" }
+ timeout { fail "(timeout) print ('ClassWithEnum::PrivEnum') 42" }
+ }
}
#