]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.base/finish.exp
2010-05-24 Michael Snyder <msnyder@vmware.com>
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / finish.exp
index 9b6b5f90a897e66636695738a44222e7eed3127c..83893b8c82833a203f0c048ae610a05f6ee8d554 100644 (file)
@@ -32,8 +32,7 @@ proc finish_1 { type } {
            "set break on ${type}_func"
     gdb_test "continue" "Breakpoint.* ${type}_func.*" \
            "continue to ${type}_func"
-    send_gdb "finish\n"
-    gdb_expect {
+    gdb_test_multiple "finish" "finish from ${type}_func" {
        -re ".*Value returned is .* = 49 '1'\r\n$gdb_prompt $" {
            if { $type == "char" } {
                pass "finish from char_func"
@@ -51,12 +50,6 @@ proc finish_1 { type } {
        -re ".*Value returned is .* = 1\r\n$gdb_prompt $" {
            pass "finish from ${type}_func"
        }
-       -re ".*$gdb_prompt $" {
-           fail "finish from ${type}_func"
-       }
-       timeout {
-           fail "finish from ${type}_func (timeout)"
-       }
     }
 }
 
@@ -67,24 +60,17 @@ proc finish_void { } {
            "set break on void_func"
     gdb_test "continue" "Breakpoint.* void_func.*" \
            "continue to void_func"
-    send_gdb "finish\n"
     # Some architectures will have one or more instructions after the
     # call instruction which still is part of the call sequence, so we
     # must be prepared for a "finish" to show us the void_func call
     # again as well as the statement after.
-    gdb_expect {
+    gdb_test_multiple "finish" "finish from void_func" {
        -re ".*void_checkpoint.*$gdb_prompt $" {
            pass "finish from void_func"
        }
        -re "0x\[0-9a-fA-F\]+ in main.*call to void_func.*$gdb_prompt $" {
            pass "finish from void_func"
        }
-       -re ".*$gdb_prompt $" {
-           fail "finish from void_func"
-       }
-       timeout {
-           fail "finish from void_func (timeout)"
-       }
     }
 }