aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/return.exp
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-27 23:44:51 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-27 23:44:51 +0000
commit02746bbc9f260f92b3abb96d862f4e75fd6f3fc0 (patch)
treeed11da9352953a731de7da35b050de94f2979877 /gdb/testsuite/gdb.base/return.exp
parent2245442480a7de9c1e2364416b928500ad87bcab (diff)
downloadfsf-binutils-gdb-02746bbc9f260f92b3abb96d862f4e75fd6f3fc0.zip
fsf-binutils-gdb-02746bbc9f260f92b3abb96d862f4e75fd6f3fc0.tar.gz
fsf-binutils-gdb-02746bbc9f260f92b3abb96d862f4e75fd6f3fc0.tar.bz2
2010-05-27 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* gdb.base/relational.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/relocate.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/restore.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/return.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/return2.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/sepdebug.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/setshow.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/setvar.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/shlib-call.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/shreloc.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/sigall.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/sigbpt.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/signull.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/so-impl-ld.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/varargs.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/volatile.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/watch_thread_num.exp: Replace uses of send_gdb / gdb_expect. * gdb.base/watchpoint.exp: Replace uses of send_gdb / gdb_expect.
Diffstat (limited to 'gdb/testsuite/gdb.base/return.exp')
-rw-r--r--gdb/testsuite/gdb.base/return.exp31
1 files changed, 16 insertions, 15 deletions
diff --git a/gdb/testsuite/gdb.base/return.exp b/gdb/testsuite/gdb.base/return.exp
index 66c8287..f1b9fd7 100644
--- a/gdb/testsuite/gdb.base/return.exp
+++ b/gdb/testsuite/gdb.base/return.exp
@@ -25,8 +25,8 @@ proc return_tests { } {
if { ! [ runto func1 ] } then { return 0 }
- send_gdb "return\n"
- gdb_expect {
+
+ gdb_test_multiple "return" "simple return" {
-re "Make .* return now.*y or n. $" {
send_gdb "y\n"
exp_continue
@@ -35,9 +35,9 @@ proc return_tests { } {
send_gdb "step\n"
exp_continue
}
- -re ".*in main after func1.*$gdb_prompt $" { pass "simple return" }
- -re "$gdb_prompt $" { fail "simple return" }
- timeout { fail "(timeout) simple return" }
+ -re ".*in main after func1.*$gdb_prompt $" {
+ pass "simple return"
+ }
}
# Set breakpoints in other interesting functions.
@@ -45,16 +45,17 @@ proc return_tests { } {
gdb_test "break func3" "" "break func3"
gdb_test "continue" "return -5;" "continue to return of -5"
- send_gdb "return 5\n"
- gdb_expect {
+
+ gdb_test_multiple "return 5" "return value 5" {
-re "Make .* return now.*y or n. $" {
send_gdb "y\n"
exp_continue
}
- -re ".*tmp2 = func2.*$gdb_prompt $" { }
- -re "$gdb_prompt $" { fail "did not return (integer test)" }
- timeout { fail "(timeout) did not return (integer test)" }
+ -re ".*tmp2 = func2.*$gdb_prompt $" {
+ # pass without comment
+ }
}
+
gdb_test "next" "tmp3 = func3.*" "next over call to func2"
gdb_test "p tmp2" ".* = 5" "correct value returned (integer test)"
@@ -64,15 +65,15 @@ proc return_tests { } {
# Return of a double does not work for 68hc11 (need struct return
# in memory).
setup_xfail "m6811-*-*"
- send_gdb "return 5.0\n"
- gdb_expect {
+
+ gdb_test_multiple "return 5.0" "return value 5.0" {
-re "Make .* return now.*y or n. $" {
send_gdb "y\n"
exp_continue
}
- -re ".*tmp3 = func3.*$gdb_prompt $" { }
- -re "$gdb_prompt $" { fail "did not return (double test)" }
- timeout { fail "(timeout) did not return (double test)" }
+ -re ".*tmp3 = func3.*$gdb_prompt $" {
+ # pass without comment
+ }
}
setup_xfail "m6811-*-*"