* carlton_runnamespace: Run gdb.c++/rtti.exp, too.
* carlton_runtest (FASTTESTS): Add gdb.c++/breakpoint.exp and
gdb.c++/rtti.exp.
* gdb.c++/breakpoint.exp (test_breakpoint): Run to main for every
breakpoint.
* gdb.c++/rtti.exp: Add more KFAIL branches.
+2003-05-16 David Carlton <carlton@bactrian.org>
+
+ * carlton_runnamespace: Run gdb.c++/rtti.exp, too.
+ * carlton_runtest (FASTTESTS): Add gdb.c++/breakpoint.exp and
+ gdb.c++/rtti.exp.
+ * gdb.c++/breakpoint.exp (test_breakpoint): Run to main for every
+ breakpoint.
+ * gdb.c++/rtti.exp: Add more KFAIL branches.
+
2003-05-09 David Carlton <carlton@bactrian.org>
* gdb.c++/breakpoint.cc: New.
# stabs info, too?
EXTRADEBUGPATH=/usr/local/testbed/gcc3/bin
+TESTS="gdb.c++/namespace.exp gdb.c++/rtti.exp"
echo "Running tests using regular compiler."
-runtest gdb.c++/namespace.exp > /dev/null 2>&1
+runtest ${TESTS} > /dev/null 2>&1
grep -v "^Test Run By" gdb.sum > /tmp/namespaceout
diff -u {carlton_,/tmp/}namespaceout
echo "Running tests using compiler with extra debug info."
-PATH=${EXTRADEBUGPATH}:${PATH} runtest gdb.c++/namespace.exp > /dev/null 2>&1
+PATH=${EXTRADEBUGPATH}:${PATH} runtest ${TESTS} > /dev/null 2>&1
grep -v "^Test Run By" gdb.sum > /tmp/namespacedebugout
diff -u {carlton_,/tmp/}namespacedebugout
gdb.c++/local.exp \
gdb.c++/m-data.exp \
gdb.c++/m-static.exp \
- gdb.c++/method.exp"
+ gdb.c++/method.exp \
+ gdb.c++/breakpoint.exp \
+ gdb.c++/rtti.exp"
# 6 seconds or more (usually around 10).
MEDTESTS="gdb.base/exprs.exp \
gdb_load ${binfile}
proc test_breakpoint {name} {
- gdb_breakpoint "${name}"
- gdb_test "continue" "Continuing.\r\n\r\nBreakpoint \[0-9\]*, ${name}.*" "continue to ${name}"
-}
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
+ # Restart the program every time, so that a single failure doesn't
+ # lead to a cascade.
+ if ![runto_main] then {
+ perror "couldn't run to main when testing ${name}"
+ continue
+ } else {
+ gdb_breakpoint "${name}"
+ gdb_test "continue" "Continuing.\r\n\r\nBreakpoint \[0-9\]*, ${name}.*" "continue to ${name}"
+ }
}
test_breakpoint "C1::Nested::foo"
-re "\\$\[0-9\]* = {<n1::Base1> = .*}\r\n$gdb_prompt $" {
pass "print *e1"
}
+ -re "\\$\[0-9\]* = {<.*Base1> = .*}\r\n$gdb_prompt $" {
+ # NOTE: carlton/2003-05-09: Sometimes, the DWARF reader gets
+ # confused about names. I've seen just Base1 or
+ # n1::D1::C1::Base1.
+ kfail "gdb/TBA" "print *e2"
+ }
}
# NOTE: carlton/2003-05-02: This test fails on my branch because,
# within rtt1.cc, GDB has no way of knowing that the class is called
# 'n2::D2' instead of just 'D2'. This is an artifical test case,
# though: if we were using these classes in a more substantial way,
-# G++ would emit more debug info.
+# G++ would emit more debug info. Arguably, the "incomplete type"
+# kfail should really be an xfail, because it works using a compiler
+# that generates DW_TAG_namespace tags.
gdb_test_multiple "print *e2" "print *e2" {
-re "warning: can't find class named `n2::D2', as given by C\\+\\+ RTTI.*$gdb_prompt $" {
-re "\\$\[0-9\]* = {<n2::Base2> = .*}\r\n$gdb_prompt $" {
pass "print *e2"
}
+ -re "\\$\[0-9\]* = {<.*Base2> = .*}\r\n$gdb_prompt $" {
+ kfail "gdb/TBA" "print *e2"
+ }
}
gdb_exit