aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/classes.exp9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp
index 60c1632..79a88d8 100644
--- a/gdb/testsuite/gdb.cp/classes.exp
+++ b/gdb/testsuite/gdb.cp/classes.exp
@@ -581,7 +581,14 @@ proc do_tests {} {
gdb_breakpoint enums2
gdb_test "continue" ".*Breakpoint .* enums2.*" "continue to enums2(\\(\\)|)"
- gdb_test "finish" "" ""
+ # Leave enums2. Make sure we reach the next line, in case there
+ # are any more instructions to finish the function call.
+ gdb_test_multiple "finish" "" {
+ -re "enums2 \\(\\);.*$gdb_prompt $" {
+ gdb_test "next" "" ""
+ }
+ -re "$gdb_prompt $" { }
+ }
test_enums
gdb_test "finish" "" ""