From f7e97bb3d85f1ce6b829200abebf0a4a3e85c5a5 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 4 Jan 2007 18:58:03 +0000 Subject: 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. --- gdb/testsuite/lib/mi-support.exp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'gdb/testsuite/lib') 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 } { -- cgit v1.2.1