Fix mi_clean_restart <absolute filename> in the test-cases in gdb.mi.
Tested on x86_64-linux.
Also tested test-case gdb.mi/mi-dprintf.exp with target boards
native-gdbserver and native-extended-gdbserver.
Since test-case gdb.mi/mi-regs.exp requires istarget "sparc-*-*", I didn't
test the trivial change in that test-case.
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
}
# GDB could have crashed.
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
register_test 666 t $binary
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
register_tests_no_exec
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
check_mi_and_console_threads "at main"
# If it doesn't, Bad Things Happen(TM).
# Run to main
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
# Step over "foo = 0"
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\" -ex \"set mi-async\""
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
}
mi_detect_async
return -1
}
-mi_clean_restart ${binfile}
+mi_clean_restart ${::testfile}
# Start execution to establish a connection.
mi_runto_main
set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""]
- if {[mi_clean_restart $binfile]} {
+ if {[mi_clean_restart $::testfile]} {
return
}
save_vars { GDBFLAGS } {
set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""]
- if {[mi_clean_restart $binfile]} {
+ if {[mi_clean_restart $::testfile]} {
return
}
}
"delete temp breakpoints"
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
} else {
set start_ops ""
}
- if [mi_clean_restart $binfile $start_ops ] {
+ if [mi_clean_restart $::testfile $start_ops ] {
return
}
global lib_sl1 lib_sl2
global binfile
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
mi_load_shlibs $lib_sl1 $lib_sl2
global lib_sl1 lib_sl2
global mi_gdb_prompt
- if {[mi_clean_restart $binfile]} {
+ if {[mi_clean_restart $::testfile]} {
return
}
mi_load_shlibs $lib_sl1 $lib_sl2
global lib_sl1 lib_sl2
global binfile
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
mi_load_shlibs $lib_sl1 $lib_sl2
global MIFLAGS decimal binfile
set MIFLAGS "-i=mi${mi_version}"
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
mi_runto_main
save_vars { ::MIFLAGS } {
set ::MIFLAGS "-i=mi${mi_version}"
- mi_clean_restart $::binfile
+ mi_clean_restart $::testfile
}
if $use_fix_flag {
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return -1
}
global srcdir subdir binfile srcfile
global main_lineno
- if {[mi_clean_restart $binfile]} {
+ if {[mi_clean_restart $::testfile]} {
return
}
# test -catch-load
with_test_prefix "catch-load" {
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
mi_locate_shlib $binfile2
mi_runto_main
# test -catch-unload
with_test_prefix "catch-unload" {
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
mi_locate_shlib $binfile2
mi_runto_main
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_gdb_test "-interpreter-exec" \
{\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp command"} \
global binfile
with_test_prefix "cmd param" {
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
mi_runto_main
if { $scheduler_locking_supported } {
set any "\[^\r\n\]*"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_create_breakpoint "$srcfile:$main_break_line" "set breakpoint in main"
mi_run_cmd
mi_expect_stop "breakpoint-hit" "main" "" $srcfile $main_break_line \
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
# Don't run to main to avoid increasing the search scope to include
# debug info of shared libraries like glibc, libgcc, etc.
return -1
}
- if {[mi_clean_restart $binfile]} {
+ if {[mi_clean_restart $::testfile]} {
return
}
proc run_test { unwind_on_signal } {
- if {[mi_clean_restart $::binfile]} {
+ if {[mi_clean_restart $::testfile]} {
return
}
proc run_test { unwind_on_exception } {
- if {[mi_clean_restart $::binfile]} {
+ if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
mi_gdb_test "-target-detach" "=thread-exited,id=\"1\".*=thread-group-exited,id=\"i1\".*" "detach"
"data-disassemble checking the opcodes bytes format"
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
test_disassembly_only
test_disassembly_with_opcodes
# number of unload events for the libraries created for this test, and
# additionally, check for dynamic linker unload events.
proc check_solib_unload_events {} {
- mi_clean_restart $::binfile
+ mi_clean_restart $::testfile
if {[mi_runto_main] == -1} {
return
set bp_line [gdb_get_line_number "Break here" $srcfile]
# Start the inferior.
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
# Place a breakpoint at the dlopen() line.
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set dp_location1 [gdb_get_line_number "set dprintf 1 here"]
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
set i 0
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
"122\\^done,groups=\\\[\{id=\"i1\",type=\"process\"\}\]" \
"-list-thread-groups before run shows no exit-code"
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
with_test_prefix "first run" {
mi_runto_main
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
global hex
global expect_out
- if {[mi_clean_restart $binfile]} {
+ if {[mi_clean_restart $::testfile]} {
fail "couldn't start gdb"
return
}
global srcfile binfile
global hex
- if {[mi_clean_restart $binfile] != 0} {
+ if {[mi_clean_restart $::testfile] != 0} {
fail "couldn't start gdb"
return
}
file delete -- $srcfileabs
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1;
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
set readnow_p [mi_readnow]
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
# Turn off the pending breakpoint queries.
mi_gdb_test "-interpreter-exec console \"set breakpoint pending off\"" \
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return -1
load_lib mi-support.exp
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
}
mi_gdb_test "-gdb-set mi-async 1" ".*"
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
}
mi_gdb_test "-gdb-set mi-async 1" ".*"
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
}
mi_gdb_test "-gdb-set mi-async 1" ".*"
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
}
mi_gdb_test "-gdb-set mi-async 1" ".*"
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
}
mi_gdb_test "-gdb-set mi-async 1" ".*"
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
}
mi_gdb_test "-gdb-set mi-async 1" ".*"
}
# Start with a fresh gdb.
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
mi_load_shlibs $lib_sl1
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
set remote_python_file [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
# Delete all breakpoints, watchpoints, tracepoints, and catchpoints.
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
load_lib mi-support.exp
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
mi_clean_restart
sparc_register_tests_no_exec
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
sparc_register_tests
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
if [supports_process_record] {
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
}
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
test_stepi_nexti
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return -1
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
# Don't run to main to avoid increasing the search scope to include
# debug info of shared libraries like libc, libgcc, etc.
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
mi_runto_main
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"maint set target-non-stop on\""
append GDBFLAGS " -ex \"set mi-async on\""
- mi_clean_restart $binfile $start_ops
+ mi_clean_restart $::testfile $start_ops
}
mi_runto_main
set start_ops ""
}
- if {[mi_clean_restart $binfile $start_ops]} {
+ if {[mi_clean_restart $::testfile $start_ops]} {
break
}
global binfile
global async
- if {[mi_clean_restart $binfile]} {
+ if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return -1
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
# the type names can be printed differently.
set real [fortran_real4]
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
}
mi_gdb_test "-gdb-set mi-async 1" ".*"
} else {
set start_ops ""
}
- if [mi_clean_restart ${binfile} $start_ops] {
+ if [mi_clean_restart ${::testfile} $start_ops] {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
return -1
}
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
}
foreach_with_prefix sync-command {"run" "continue"} {
- if {[mi_clean_restart $binfile "separate-mi-tty"] != 0} {
+ if {[mi_clean_restart $::testfile "separate-mi-tty"] != 0} {
fail "could not start gdb"
break
}
with_test_prefix "${mi_command}" {
global srcfile binfile
- mi_clean_restart $binfile
+ mi_clean_restart $::testfile
mi_runto_main
set line_number [gdb_get_line_number "break here"]
return -1
}
-if [mi_clean_restart $binfile] {
+if [mi_clean_restart $::testfile] {
return
}
# UI_TO_RUN is the UI that should issue the run command.
proc do_test { ui_to_run } {
- if {[mi_clean_restart $::binfile "separate-mi-tty"] != 0} {
+ if {[mi_clean_restart $::testfile "separate-mi-tty"] != 0} {
fail "could not start gdb"
return
}
set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop 1\""]
}
- if { [mi_clean_restart $binfile "separate-mi-tty"] != 0 } {
+ if { [mi_clean_restart $::testfile "separate-mi-tty"] != 0 } {
break
}
}