load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart $binfile]} {
return
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
# And finally, the meat of the testcase... Insert an Ada exception
# catchpoint that uses both conditions and exception name.
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart $binfile]} {
return
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
# This test won't work properly if system debuginfo is installed.
mi_gdb_test "-gdb-set debug-file-directory \"\"" ".*"
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart $binfile]} {
return
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
####################################
# 1. Try catching all exceptions. #
####################################
set MIFLAGS "-i=mi"
global mi_gdb_prompt
- global srcdir
- global subdir
global binfile
with_test_prefix "mi" {
- gdb_exit
- if {[mi_gdb_start]} {
- return -1
+ if {[mi_clean_restart $binfile]} {
+ return
}
- mi_delete_breakpoints
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load $binfile
-
# This causes GDB to dereference a pointer-to-structure when doing
# -var-create.
mi_gdb_test "-gdb-set print object on" ".*" "set print object on"
return -1
}
-if [mi_gdb_start] {
+if {[mi_clean_restart $binfile]} {
return
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
if [mi_runto func_nofb_marker] {
# First try referencing DW_AT_frame_base which is not defined.
mi_gdb_test "300-stack-list-locals --thread 1 --frame 1 --all-values" \
}
# GDB could have crashed.
-mi_gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart $binfile]} {
return
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
# And now try referencing DW_AT_frame_base defined using a self-reference
# (DW_OP_fbreg).
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""]
- gdb_exit
- if [mi_gdb_start] {
+ if {[mi_clean_restart $binfile]} {
return
}
- mi_gdb_load ${binfile}
mi_run_cmd
mi_gdb_test "123-exec-interrupt --all" "123\\^done" "send interrupt command"
mi_expect_interrupt "expect interrupt"
load_lib mi-support.exp
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
# mi_gdb_test cannot be used for asynchronous commands because there are
# two prompts involved and this can lead to a race condition.
"delete temp breakpoints"
}
-mi_gdb_exit
-
-if [mi_gdb_start] {
+if {[mi_clean_restart $binfile]} {
return
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
test_break_qualified
global lib_sl1 lib_sl2
global mi_gdb_prompt
- gdb_exit
- if [mi_gdb_start] {
+ if {[mi_clean_restart $binfile]} {
return
}
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
mi_load_shlibs $lib_sl1 $lib_sl2
# Create a pending breakpoint on pendfunc1
global srcdir subdir binfile srcfile
global main_lineno
- if {[mi_gdb_start]} {
+ if {[mi_clean_restart $binfile]} {
return
}
- mi_delete_breakpoints
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
-
mi_runto_main
mi_create_breakpoint \
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
global mi_gdb_prompt async
with_test_prefix "$variant" {
- gdb_exit
- if [mi_gdb_start] {
- return
- }
-
set options {debug}
if {$variant == "mt" } {
lappend options "pthreads"
return -1
}
- mi_delete_breakpoints
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
+ if {[mi_clean_restart $binfile]} {
+ return
+ }
mi_runto test
return [join $semihosted_list ""]
}
-gdb_exit
-if [mi_gdb_start separate-inferior-tty] {
- return
-}
-
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
+
mi_runto_main
# The output we get from the target depends on how it is hosted. If
return -1
}
-# Start with a fresh gdb.
-gdb_exit
-mi_gdb_start
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
+
mi_load_shlibs $lib_sl1
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if {[mi_gdb_start]} {
+if {[mi_clean_restart]} {
return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
set line_callee4_head [gdb_get_line_number "callee4 ("]
set line_callee4_body [expr $line_callee4_head + 2]
return -1
}
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_file_cmd ${binfile}
proc mi_gdbserver_run { } {
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
+if {[mi_clean_restart]} {
+ return
+}
mi_gdb_file_cmd ${binfile}
proc test_file_list_exec_source_file {} {
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile
set srcfileabs [standard_output_file $srcfile]
file delete -- $srcfileabs
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_gdb_test "-interpreter-exec console \"set substitute-path ${initdir} ${initdir}subst\"" {\^done} "set substitute-path"
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
# Support for XML-output is needed to run this test.
require allow_xml_test
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile basics.c
if [build_executable "Failed to build $testfile" $testfile $srcfile \
debug] {
return -1;
}
-if {[mi_gdb_load $binfile] < 0} {
- return -1
+
+if {[mi_clean_restart $binfile]} {
+ return
}
+
# When testing a cross configuration, we need to be sure to first
# connect to the target. If we didn't do that, GDB would try running
# the command against the default run target. The usual way to do
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile .cc
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
return -1
}
+if {[mi_clean_restart $binfile]} {
+ return
+}
+
# Test that children of derived classes are given the proper
# path by -var-info-path-expression
-mi_gdb_load ${binfile}
mi_runto C::testLocation
mi_create_varobj "var1" "this" "create var for THIS"
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
load_lib mi-support.exp
-if [mi_gdb_start] {
+if {[mi_clean_restart $binfile]} {
return
}
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
mi_gdb_test "-break-insert -t ${srcfile}:[gdb_get_line_number "C = A + B"]" \
"\\^done,bkpt=\{number=\"1\".*" \
}
# Start with a fresh gdb.
-gdb_exit
-mi_gdb_start
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_load_shlibs $lib_sl1
mi_load_shlibs $lib_sl2
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if {[mi_gdb_start]} {
- return
-}
-
# This procedure tests the various thread commands in MI.
proc check_mi_thread_command_set {} {
return -1
}
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load $binfile
+if {[mi_clean_restart $binfile]} {
+ return
+}
check_mi_thread_command_set
# This test can only be run on x86_64 targets.
require is_x86_64_m64_target
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nopie}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
if ![mi_runto stop_frame] {
perror "Failed to stop in stop_frame"
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
+if {[mi_clean_restart $binfile]} {
+ return
+}
proc test_return_simple {} {
global mi_gdb_prompt
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
proc test_breakpoints_creation_and_listing {} {
global srcfile
require allow_shlib_tests
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile solib-main.c solib-lib.c
set libname "solib-lib"
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_load_shlibs $binfile_lib
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
proc test_stack_frame_listing {} {
global mi_gdb_prompt
# then there is no point in running this testcase...
require !use_gdb_stub
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
standard_testfile mi-start.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
# First, verify that the debugger correctly advertises support
# for the --start option of the -exec-run command.
global binfile
global async
- gdb_exit
- if {[mi_gdb_start]} {
+ if {[mi_clean_restart $binfile]} {
return
}
- # Load the binary in gdb...
- mi_gdb_load $binfile
-
# ... and run it.
#
# Note this test relies on mi_runto deleting the breakpoint.
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
-
# First, verify that the debugger correctly advertises support
# for the "undefined-command" error code...
mi_gdb_test "-list-features" \
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile until.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
proc test_running_to_foo {} {
set line [gdb_get_line_number "in-loop"]
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile var-cmd.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_runto do_block_tests
require allow_fortran_tests
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile array.f90
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
# Avoid shared lib symbols.
mi_gdb_test "-gdb-set auto-solib-add off" "\\^done"
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_runto do_children_tests
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile var-cmd.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
-
+if {[mi_clean_restart $binfile]} {
+ return
+}
##### #####
# #
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile .cc
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
return -1
}
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_prepare_inline_tests $srcfile
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile var-cmd.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
set line_dct_end [gdb_get_line_number "{int a = 0;}"]
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile var-cmd.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
# Desc: Create global variable.
mi_create_varobj global_simple global_simple "create global variable"
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
set line_invalid_pointer_value [gdb_get_line_number "p_outer set to invalid value"]
set line_valid_pointer_value [gdb_get_line_number "p_outer set to valid value"]
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile .cc
set opts {debug c++}
return -1
}
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_prepare_inline_tests $srcfile
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile vla.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" \
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
set bp_lineno [gdb_get_line_number "vla-filled"]
load_lib fortran.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile vla.f90
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
# the type names can be printed differently.
set real [fortran_real4]
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
set bp_lineno [gdb_get_line_number "vla1-not-allocated"]
mi_create_breakpoint "-t vla.f90:$bp_lineno" \
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile .s
set opts {}
require is_x86_64_m64_target
}
-set executable ${testfile}
-
-if [build_executable ${testfile}.exp ${executable} ${srcfile} $opts] {
+if [build_executable ${testfile}.exp ${binfile} ${srcfile} $opts] {
return -1
}
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
foreach name {different breakhere_different breakhere_validity breakhere_invalid} {
mi_create_breakpoint $name "break $name"
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
-if {[mi_gdb_start]} {
- return
-}
-
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_runto do_tests
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
-gdb_exit
-if [mi_gdb_start] {
+if {[mi_clean_restart]} {
return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile var-cmd.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
mi_runto do_children_tests
set MIFLAGS "-i=mi2"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile py-framefilter-mi.c
set pyfile py-framefilter.py
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
require allow_python_tests
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile
+
set pyfile ${testfile}-gdb.py
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
+if {[mi_clean_restart]} {
+ return
+}
+
mi_gdb_test "set auto-load safe-path ${remote_python_file}" \
{.*\^done} \
"set safe-path"
require allow_python_tests
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile
set pyfile ${testfile}-gdb.py
# gdb will find it.
set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
+if {[mi_clean_restart $binfile]} {
+ return
+}
+
mi_gdb_test "set auto-load safe-path ${remote_python_file}" \
{.*\^done} \
"set safe-path"
load_lib mi-support.exp
set MIFLAGS "-i=mi2"
-gdb_exit
-if [mi_gdb_start] {
- return
-}
-
standard_testfile py-prettyprint.c
set pyfile py-prettyprint.py
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } {
return -1
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+if {[mi_clean_restart $binfile]} {
+ return
+}
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
return -1
}
-if [mi_gdb_start] {
+if {[mi_clean_restart ${binfile}-cxx]} {
return
}
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}-cxx
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
}
}
- gdb_exit
+ global binfile
- if [mi_gdb_start] {
+ if {[mi_clean_restart $binfile]} {
return
}
- global srcdir
- global subdir
- global binfile
-
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
-
global gdbserver_protocol
global gdbserver_gdbport
with_test_prefix "pending resolved" {
global decimal hex
global executable
- global srcdir
- global subdir
global binfile
global lib_sl1 lib_sl2
global mi_gdb_prompt
- gdb_exit
- if [mi_gdb_start] {
+ if {[mi_clean_restart $binfile]} {
return
}
-
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
mi_load_shlibs $lib_sl1 $lib_sl2
# Create a pending tracepoint on pendfunc2
return -1
}
gdb_exit
- if [mi_gdb_start] {
+
+ if {[mi_clean_restart $binfile]} {
return
}
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
-
mi_gdb_test "tvariable \$tvar3 = 3" \
".*=tsv-created,name=\"tvar3\",initial=\"3\".*\\^done" \
"tvariable \$tvar3 modified"
}
}
- gdb_exit
-
- if [mi_gdb_start] {
+ global binfile
+ if {[mi_clean_restart $binfile]} {
return
}
- global srcdir
- global subdir
- global binfile
-
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
-
global gdbserver_protocol
global gdbserver_gdbport