summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.c++/overload.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.c++/overload.exp')
-rw-r--r--gdb/testsuite/gdb.c++/overload.exp18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.c++/overload.exp
index 227b0553ced..be60250aead 100644
--- a/gdb/testsuite/gdb.c++/overload.exp
+++ b/gdb/testsuite/gdb.c++/overload.exp
@@ -120,6 +120,24 @@ gdb_expect {
}
+# 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 and 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 .*overload.cc:7\[78\].*" \
+ "finish call to marker1"
+ }
+ -re "#1 ($hex in )?main.*$gdb_prompt $" {
+ pass "re-selected 'main' frame after inferior call"
+ }
+}
+
+
send_gdb "print foo_instance1.overloadargs(1, 2)\n"
gdb_expect {
-re ".\[0-9\]* = 2\r\n$gdb_prompt $" {