-# Copyright (C) 1995 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1997 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
# fails, then we skip the other tests.
proc set_lang_chill {} {
- global prompt
+ global gdb_prompt
global binfile objdir subdir
verbose "loading file '$binfile'"
gdb_load $binfile
- send "set language chill\n"
- expect {
- -re ".*$prompt $" {}
+ send_gdb "set language chill\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" {}
timeout { fail "set language chill (timeout)" ; return 0 }
}
- send "show language\n"
- expect {
- -re ".* source language is \"chill\".*$prompt $" {
+ send_gdb "show language\n"
+ gdb_expect {
+ -re ".* source language is \"chill\".*$gdb_prompt $" {
pass "set language to \"chill\""
- send "break dummyfunc\n"
- expect {
- -re ".*$prompt $" {
- send "run\n"
- expect -re ".*$prompt $" {}
+ send_gdb "break dummyfunc\n"
+ gdb_expect {
+ -re ".*$gdb_prompt $" {
+ send_gdb "run\n"
+ gdb_expect -re ".*$gdb_prompt $" {}
return 1
}
timeout {
}
}
}
- -re ".*$prompt $" {
+ -re ".*$gdb_prompt $" {
fail "setting language to \"chill\""
return 0
}
#
# Args are:
#
-# First one is string to send to gdb
+# First one is string to send_gdb to gdb
# Second one is string to match gdb result to
# Third one is an optional message to be printed
proc test_print_accept { args } {
- global prompt
+ global gdb_prompt
global passcount
global verbose
test_print_accept "ptype r16" "long \\(-2147483648:2147483647\\)" \
"print long range mode"
- # Not sure what this should be.
- setup_xfail "*-*-*"
test_print_accept "ptype r2" "set1 \\(bbb:ccc\\)" \
"print unnumbered set range mode"
- setup_xfail "*-*-*"
test_print_accept "ptype r3" "nset1 \\(na:na\\)" \
"print numbered set range mode"
# really this order ?
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-send "set print sevenbit-strings\n" ; expect -re ".*$prompt $"
+gdb_test "set print sevenbit-strings" ".*"
if [set_lang_chill] then {
test_modes