aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.c++/userdef.exp
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-04-09 23:21:14 +0000
committerJim Blandy <jimb@codesourcery.com>2003-04-09 23:21:14 +0000
commit5624293aaafe09ce378b5044c877ba23393ef315 (patch)
treea00080dd14a233cc7245852c57957ba9f2b3f49e /gdb/testsuite/gdb.c++/userdef.exp
parent366cfc9e2bad99674c8aed9e3b8118df7f25ee60 (diff)
downloadgdb-5624293aaafe09ce378b5044c877ba23393ef315.zip
gdb-5624293aaafe09ce378b5044c877ba23393ef315.tar.gz
gdb-5624293aaafe09ce378b5044c877ba23393ef315.tar.bz2
* gdb.c++/derivation.exp, gdb.c++/overload.exp,
gdb.c++/userdef.exp: If GDB fails to restore the selected frame after an inferior function call, report the failure, but allow the test to continue.
Diffstat (limited to 'gdb/testsuite/gdb.c++/userdef.exp')
-rw-r--r--gdb/testsuite/gdb.c++/userdef.exp17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.c++/userdef.exp b/gdb/testsuite/gdb.c++/userdef.exp
index a46aba6..9a8fb02 100644
--- a/gdb/testsuite/gdb.c++/userdef.exp
+++ b/gdb/testsuite/gdb.c++/userdef.exp
@@ -66,6 +66,23 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
gdb_test "print one + two" "\\\$\[0-9\]* = {x = 6, y = 8}"
+# If GDB fails to restore the selected frame properly after the
+# inferior function call above (see GDB PR 1155 for an explanation of
+# why this might happen), all the subsequent tests will fail. We
+# should detect report that failure, but let the marker call finish so
+# that the rest of the tests can run undisturbed.
+gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
+ -re "#0 marker1.*$gdb_prompt $" {
+ setup_kfail "gdb/1155" s390-*-linux-gnu
+ fail "re-selected 'main' frame after inferior call"
+ gdb_test "finish" ".*main.*at .*userdef.cc:27\[67\].*" \
+ "finish call to marker1"
+ }
+ -re "#1 ($hex in )?main.*$gdb_prompt $" {
+ pass "re-selected 'main' frame after inferior call"
+ }
+}
+
gdb_test "print one - two" "\\\$\[0-9\]* = {x = -2, y = -2}"
gdb_test "print one * two" "\\\$\[0-9\]* = {x = 8, y = 15}"