aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/return2.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/return2.exp
parent2245442480a7de9c1e2364416b928500ad87bcab (diff)
downloadgdb-02746bbc9f260f92b3abb96d862f4e75fd6f3fc0.zip
gdb-02746bbc9f260f92b3abb96d862f4e75fd6f3fc0.tar.gz
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/return2.exp')
-rw-r--r--gdb/testsuite/gdb.base/return2.exp43
1 files changed, 16 insertions, 27 deletions
diff --git a/gdb/testsuite/gdb.base/return2.exp b/gdb/testsuite/gdb.base/return2.exp
index a1284dc..f3d69d4 100644
--- a/gdb/testsuite/gdb.base/return2.exp
+++ b/gdb/testsuite/gdb.base/return2.exp
@@ -36,26 +36,21 @@ proc return_1 { type } {
"set break on ${type}_func"
gdb_test "continue" "Breakpoint.* ${type}_func.*" \
"continue to ${type}_func"
- send_gdb "return testval.${type}_testval\n"
- gdb_expect {
- -re "Make ${type}_func return now.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re ".*${type}_resultval *= ${type}_func.*$gdb_prompt $" {
- send_gdb "step\n"
- exp_continue
- }
- -re ".*${type}_checkpoint.*$gdb_prompt $" {
- pass "return from ${type}_func"
- }
- -re ".*$gdb_prompt $" {
- fail "return from ${type}_func"
- }
- timeout {
- fail "return from ${type}_func (timeout)"
+
+ gdb_test_multiple "return testval.${type}_testval" \
+ "return from ${type}_func" {
+ -re "Make ${type}_func return now.*y or n. $" {
+ send_gdb "y\n"
+ exp_continue
+ }
+ -re ".*${type}_resultval *= ${type}_func.*$gdb_prompt $" {
+ send_gdb "step\n"
+ exp_continue
+ }
+ -re ".*${type}_checkpoint.*$gdb_prompt $" {
+ pass "return from ${type}_func"
+ }
}
- }
gdb_test "print ${type}_resultval == testval.${type}_testval" ".* = 1" \
"${type} value returned successfully"
gdb_test "print ${type}_resultval != ${type}_returnval" ".* = 1" \
@@ -69,8 +64,8 @@ proc return_void { } {
"set break on void_func"
gdb_test "continue" "Breakpoint.* void_func.*" \
"continue to void_func"
- send_gdb "return \n"
- gdb_expect {
+
+ gdb_test_multiple "return" "return from void_func" {
-re "Make void_func return now.*y or n. $" {
send_gdb "y\n"
exp_continue
@@ -82,12 +77,6 @@ proc return_void { } {
-re ".*void_checkpoint.*$gdb_prompt $" {
pass "return from void_func"
}
- -re ".*$gdb_prompt $" {
- fail "return from void_func"
- }
- timeout {
- fail "return from void_func (timeout)"
- }
}
gdb_test "print void_test == 0" ".* = 1" \
"void function returned successfully"