summaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2007-01-04 18:58:03 +0000
committerVladimir Prus <vladimir@codesourcery.com>2007-01-04 18:58:03 +0000
commitf7e97bb3d85f1ce6b829200abebf0a4a3e85c5a5 (patch)
tree6bff14ea9a149b4d81c83fe7b84d5226d17cce3e /gdb/testsuite/lib
parent2ca3ace5aa841b86ed826a95f417172ba9af6774 (diff)
downloadbinutils-gdb-f7e97bb3d85f1ce6b829200abebf0a4a3e85c5a5.tar.gz
Simplify usage of mi_continue_to.
* lib/mi-support.exp (mi_runto_helper): Renamed from mi_runto, added new parameter 'run_or_continue'. (mi_runto): Use mi_runto_helper. (mi_continue_to): Accept just function name as parameter. Use mi_runto_helper. * gdb.mi/mi-var-cmd.exp: Adjust to changes. * gdb.mi/mi2-var-cmd.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/mi-support.exp16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 75f40394a55..975c8424f8c 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -858,7 +858,7 @@ proc mi_run_to_main { } {
# -1 if test suppressed, failed, timedout
# 0 if test passed
-proc mi_runto {func} {
+proc mi_runto_helper {func run_or_continue} {
global suppress_flag
if { $suppress_flag } {
return -1
@@ -877,7 +877,11 @@ proc mi_runto {func} {
set bkptno {[0-9]+}
}
- mi_run_cmd
+ if {$run_or_continue == "run"} {
+ mi_run_cmd
+ } else {
+ send_gdb "000-exec-continue\n"
+ }
gdb_expect {
-re ".*000\\*stopped,thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=\(\\\[.*\\\]\|\{.*\}\),file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
pass "$test"
@@ -893,6 +897,9 @@ proc mi_runto {func} {
}
}
+proc mi_runto {func} {
+ mi_runto_helper $func "run"
+}
# Next to the next statement
# For return values, see mi_execute_to_helper
@@ -967,9 +974,8 @@ proc mi_finish_to { func args file line result ret test } {
"$test"
}
-proc mi_continue_to { bkptno func args file line test } {
- mi_execute_to "exec-continue" "breakpoint-hit\",bkptno=\"$bkptno" \
- "$func" "$args" "$file" "$line" "" "$test"
+proc mi_continue_to {func} {
+ mi_runto_helper $func "continue"
}
proc mi0_execute_to { cmd reason func args file line extra test } {