aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/break.exp
diff options
context:
space:
mode:
authorBob Manson <manson@cygnus>1997-02-24 05:43:35 +0000
committerBob Manson <manson@cygnus>1997-02-24 05:43:35 +0000
commit40ac16240a6232f31d8b29278a610cee3b6a35cf (patch)
tree63a7bdfdddbf860e72dde81594e22d9597444524 /gdb/testsuite/gdb.base/break.exp
parent2f671f8415a5e7a780a7fb50586891b3342c4577 (diff)
downloadgdb-40ac16240a6232f31d8b29278a610cee3b6a35cf.zip
gdb-40ac16240a6232f31d8b29278a610cee3b6a35cf.tar.gz
gdb-40ac16240a6232f31d8b29278a610cee3b6a35cf.tar.bz2
* config/vr4300.exp: New file.
* gdb.*/*.exp: Call gdb_expect instead of expect. * lib/gdb.exp(gdb_expect): New function.
Diffstat (limited to 'gdb/testsuite/gdb.base/break.exp')
-rw-r--r--gdb/testsuite/gdb.base/break.exp25
1 files changed, 12 insertions, 13 deletions
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 099fd27..d9c0826 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -57,10 +57,10 @@ if [target_info exists gdb_stub] {
# for general use elsewhere.
send_gdb "delete breakpoints\n"
-expect {
- -i $gdb_spawn_id -re "Delete all breakpoints.*$" {
+gdb_expect {
+ -re "Delete all breakpoints.*$" {
send_gdb "y\n"
- expect {
+ gdb_expect {
-re "$gdb_prompt $" {
setup_xfail "i*86-*-sysv4*" "sparc-sun-sunos4*" "alpha-dec-osf*" "mips-dec-ultrix*"
fail "Delete all breakpoints when none (unexpected prompt)"
@@ -68,7 +68,7 @@ expect {
timeout { fail "Delete all breakpoints when none (timeout after unexpected prompt)" }
}
}
- -i $gdb_spawn_id -re ".*$gdb_prompt $" { pass "Delete all breakpoints when none" }
+ -re ".*$gdb_prompt $" { pass "Delete all breakpoints when none" }
timeout { fail "Delete all breakpoints when none (timeout)" }
}
@@ -146,7 +146,7 @@ if ![target_info exists use_gdb_stub] {
} else {
send_gdb "run\n"
}
- expect {
+ gdb_expect {
-re "The program .* has been started already.*y or n. $" {
send_gdb "y\n"
exp_continue
@@ -204,7 +204,7 @@ gdb_test "tbreak $srcfile:factorial" "Breakpoint.*at.* file .*$srcfile, line.*"
# test break at line number
#
send_gdb "tbreak 64\n"
-expect {
+gdb_expect {
-re "Breakpoint.*at.* file .*$srcfile, line 64.*$gdb_prompt $" { pass "Temporary breakpoint line number" }
-re ".*$gdb_prompt $" { pass "Temporary breakpoint line number" }
timeout { fail "breakpoint line number (timeout)" }
@@ -216,7 +216,7 @@ gdb_test "tbreak 60" "Breakpoint.*at.* file .*$srcfile, line 60.*" "Temporary br
# test break at line number in file
#
send_gdb "tbreak $srcfile:70\n"
-expect {
+gdb_expect {
-re "Breakpoint.*at.* file .*$srcfile, line 70.*$gdb_prompt $" { pass "Temporary breakpoint line number in file" }
-re ".*$gdb_prompt $" { pass "Temporary breakpoint line number in file" }
timeout { fail "Temporary breakpoint line number in file (timeout)" }
@@ -245,7 +245,6 @@ proc test_clear_command {} {
proc test_next_with_recursion {} {
global gdb_prompt
global decimal
- global noresults
global binfile
if [istarget "d10v-*-*"] {
@@ -272,7 +271,7 @@ proc test_next_with_recursion {} {
} else {
gdb_run_cmd
}
- expect {
+ gdb_expect {
-re "Break.* factorial .value=6. .*$gdb_prompt $" {}
timeout { fail "run to factorial(6) (timeout)" ; return }
}
@@ -280,7 +279,7 @@ proc test_next_with_recursion {} {
# Continue until we call factorial recursively with 5.
send_gdb "continue\n"
- expect {
+ gdb_expect {
-re "Continuing.*Break.* factorial .value=5. .*$gdb_prompt $" {}
timeout { fail "continue to factorial(5) (timeout)" ; return }
}
@@ -296,7 +295,7 @@ proc test_next_with_recursion {} {
# we will be performing with 4.
send_gdb "next\n"
- expect {
+ gdb_expect {
-re ".* factorial .value - 1.;.*$gdb_prompt $" {}
timeout { fail "next to recursive call (timeout)" ; return }
}
@@ -322,7 +321,7 @@ proc test_next_with_recursion {} {
"backtrace from factorial(5.1)"]
if { $result != 0 } { return }
- if { $noresults == 1 } { return }
+ if [target_info exists gdb,noresults] { return }
if [target_info exists use_gdb_stub] {
gdb_breakpoint "exit"
gdb_test "continue" "Continuing..*Breakpoint .*exit .code=0.*" "continue until exit in recursive next test"
@@ -344,5 +343,5 @@ if [istarget "*-*-vxworks*"] {
set timeout 10
verbose "Timeout is now $timeout seconds" 2
send_gdb "set args main\n"
- expect -re ".*$gdb_prompt $" {}
+ gdb_expect -re ".*$gdb_prompt $" {}
}