summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-05-16 16:10:54 +0000
committerDavid Carlton <carlton@bactrian.org>2003-05-16 16:10:54 +0000
commited7a4656e022eaea3a299e5b8b46e01e6db622e7 (patch)
treedd9151e7bc768b9ac28f85195bb99456709c11c7
parent66885a91d7bc72b488f7e5ade96d45b9ac874ee6 (diff)
downloadgdb-ed7a4656e022eaea3a299e5b8b46e01e6db622e7.tar.gz
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.
-rw-r--r--gdb/testsuite/ChangeLog9
-rwxr-xr-xgdb/testsuite/carlton_runnamespace5
-rwxr-xr-xgdb/testsuite/carlton_runtest4
-rw-r--r--gdb/testsuite/gdb.c++/breakpoint.exp16
-rw-r--r--gdb/testsuite/gdb.c++/rtti.exp13
5 files changed, 36 insertions, 11 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index df5c7f76ed7..8f67f2ef7be 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+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.
diff --git a/gdb/testsuite/carlton_runnamespace b/gdb/testsuite/carlton_runnamespace
index e8ce420697c..60e4dfe7a0f 100755
--- a/gdb/testsuite/carlton_runnamespace
+++ b/gdb/testsuite/carlton_runnamespace
@@ -6,13 +6,14 @@
# 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
diff --git a/gdb/testsuite/carlton_runtest b/gdb/testsuite/carlton_runtest
index 806ea8cae39..db4ad87c2ba 100755
--- a/gdb/testsuite/carlton_runtest
+++ b/gdb/testsuite/carlton_runtest
@@ -24,7 +24,9 @@ FASTTESTS="gdb.base/assign.exp \
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 \
diff --git a/gdb/testsuite/gdb.c++/breakpoint.exp b/gdb/testsuite/gdb.c++/breakpoint.exp
index 3a132b03416..89231059a84 100644
--- a/gdb/testsuite/gdb.c++/breakpoint.exp
+++ b/gdb/testsuite/gdb.c++/breakpoint.exp
@@ -53,13 +53,15 @@ gdb_reinitialize_dir $srcdir/$subdir
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"
diff --git a/gdb/testsuite/gdb.c++/rtti.exp b/gdb/testsuite/gdb.c++/rtti.exp
index 6f79c711a7f..e968e808041 100644
--- a/gdb/testsuite/gdb.c++/rtti.exp
+++ b/gdb/testsuite/gdb.c++/rtti.exp
@@ -88,13 +88,21 @@ gdb_test_multiple "print *e1" "print *e1" {
-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 $" {
@@ -106,6 +114,9 @@ gdb_test_multiple "print *e2" "print *e2" {
-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