aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/callfuncs.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/callfuncs.exp')
-rw-r--r--gdb/testsuite/gdb.base/callfuncs.exp22
1 files changed, 6 insertions, 16 deletions
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index f7fc641..d660051 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -58,27 +58,17 @@ if [target_info exists gdb,cannot_call_functions] {
proc set_lang_c {} {
global gdb_prompt
- send_gdb "set language c\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- timeout { fail "set language c (timeout)" ; return 0; }
- }
+ gdb_test_no_output "set language c"
+
+ set success 0
- send_gdb "show language\n"
- gdb_expect {
+ gdb_test_multiple "show language" "set language to \"c\"" {
-re ".* source language is \"c\".*$gdb_prompt $" {
pass "set language to \"c\""
- return 1
- }
- -re ".*$gdb_prompt $" {
- fail "setting language to \"c\""
- return 0
- }
- timeout {
- fail "can't show language (timeout)"
- return 0
+ set success 1
}
}
+ return $success
}
# FIXME: Before calling this proc, we should probably verify that