Eliminate mi_run_to_main, introduce mi_clean_restart

Since we now have mi_runto_main which is like runto_main, eliminate
mi_run_to_main, in favor of a new MI clean_restart counterpart --
mi_clean_restart -- and mi_runto_main.

This makes MI testcases look a bit more like CLI testcases.

gdb/testsuite/ChangeLog:

	* lib/mi-support.exp (mi_clean_restart): New.
	(mi_run_to_main): Delete.
	All callers adjust to use mi_clean_restart / mi_runto_main.

Change-Id: I34920bab4fea1f23fb752928c2969c1f6ad714b6
This commit is contained in:
Pedro Alves 2020-10-11 21:58:31 +01:00
parent e777225bfd
commit b75d55d4d2
60 changed files with 190 additions and 400 deletions

View file

@ -49,7 +49,8 @@ if [is_remote host] {
}
mi_gdb_test "-file-exec-and-symbols ${filename}" ".*\\^done" "file-exec-and-symbols operation"
mi_run_to_main
mi_gdb_load ${binfile}
mi_runto_main
# register the python event handlers with test-events command

View file

@ -18,11 +18,6 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi"
gdb_exit
if {[mi_gdb_start]} {
continue
}
#
# Start here
#
@ -32,6 +27,8 @@ if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" }
return -1
}
mi_clean_restart $binfile
# Skip all tests if Python scripting is not enabled.
if { [mi_skip_python_tests] } { continue }
@ -48,9 +45,7 @@ mi_gdb_test "set python print-stack full" \
".*\\^done" \
"set python print-stack full"
mi_run_to_main
mi_runto_main
mi_continue_to_line [gdb_get_line_number "next line" ${srcfile}] \
"step to breakpoint"