From: Tom de Vries Date: Thu, 4 Sep 2025 07:23:13 +0000 (+0200) Subject: [gdb/testsuite] Fix clean_restart in gdb.ada X-Git-Tag: gdb-17-branchpoint~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b91a77eda91d4ce5a582647795032dec6899e4e;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix clean_restart in gdb.ada Fix clean_restart in the test-cases in gdb.ada. Tested on x86_64-linux with gcc 14. --- diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp index c52757edee6..31add111e96 100644 --- a/gdb/testsuite/gdb.ada/exec_changed.exp +++ b/gdb/testsuite/gdb.ada/exec_changed.exp @@ -84,7 +84,7 @@ if { [gdb_start_cmd] < 0 } { # Try again, this time with just changing the file time of first. -clean_restart "${binfile}$EXEEXT" +clean_restart "${::testfile}$EXEEXT" # Ensure we don't accidentally use the main symbol cache. gdb_test_no_output "mt set symbol-cache-size 0" diff --git a/gdb/testsuite/gdb.ada/file-then-restart.exp b/gdb/testsuite/gdb.ada/file-then-restart.exp index faa9962dfac..6e8e058f703 100644 --- a/gdb/testsuite/gdb.ada/file-then-restart.exp +++ b/gdb/testsuite/gdb.ada/file-then-restart.exp @@ -36,7 +36,7 @@ if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} { } foreach_with_prefix scenario {kill no-kill} { - clean_restart $binfile + clean_restart $::testfile # Start the program, we should land in the program main procedure if {[gdb_start_cmd] < 0} { diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert.exp b/gdb/testsuite/gdb.ada/mi_catch_assert.exp index 1b4609a6438..c3dbfca14b9 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_assert.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_assert.exp @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional load_lib mi-support.exp set MIFLAGS "-i=mi" -mi_clean_restart $binfile +mi_clean_restart $::testfile ################################################### # 2. Try catching conditionnal failed assertion. # diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp index da3d3408fe2..08370282673 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp @@ -30,7 +30,7 @@ set any_nb "\[0-9\]+" load_lib mi-support.exp set MIFLAGS "-i=mi" -mi_clean_restart $binfile +mi_clean_restart $::testfile #################################### # 1. Try catching all exceptions. # diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp index 00e8f6e999e..0c50f594083 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional load_lib mi-support.exp set MIFLAGS "-i=mi" -mi_clean_restart $binfile +mi_clean_restart $::testfile ############################################# # 1. Try catching all exceptions handlers. # diff --git a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp index c0e9f7fb827..b01f3e9357a 100644 --- a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp +++ b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } load_lib mi-support.exp set MIFLAGS "-i=mi" -mi_clean_restart $binfile +mi_clean_restart $::testfile if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_ex_cond.exp b/gdb/testsuite/gdb.ada/mi_ex_cond.exp index 53ace229797..43caf768ee3 100644 --- a/gdb/testsuite/gdb.ada/mi_ex_cond.exp +++ b/gdb/testsuite/gdb.ada/mi_ex_cond.exp @@ -30,7 +30,7 @@ set any_nb "\[0-9\]+" load_lib mi-support.exp set MIFLAGS "-i=mi" -if {[mi_clean_restart $binfile]} { +if {[mi_clean_restart $::testfile]} { return } diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp index b9d00721b4d..a95fb23a3f1 100644 --- a/gdb/testsuite/gdb.ada/mi_exc_info.exp +++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } load_lib mi-support.exp set MIFLAGS "-i=mi" -mi_clean_restart $binfile +mi_clean_restart $::testfile if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp index 630353d14d1..f25adf0276d 100644 --- a/gdb/testsuite/gdb.ada/mi_interface.exp +++ b/gdb/testsuite/gdb.ada/mi_interface.exp @@ -28,7 +28,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional load_lib mi-support.exp set MIFLAGS "-i=mi" -mi_clean_restart $binfile +mi_clean_restart $::testfile if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_prot.exp b/gdb/testsuite/gdb.ada/mi_prot.exp index 7f68ca87c74..4edc93bad77 100644 --- a/gdb/testsuite/gdb.ada/mi_prot.exp +++ b/gdb/testsuite/gdb.ada/mi_prot.exp @@ -28,7 +28,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \ load_lib mi-support.exp set MIFLAGS "-i=mi" -mi_clean_restart $binfile +mi_clean_restart $::testfile if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp index 315e2b30291..c69f61598b1 100644 --- a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp +++ b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } load_lib mi-support.exp set MIFLAGS "-i=mi" -mi_clean_restart $binfile +mi_clean_restart $::testfile if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_string_access.exp b/gdb/testsuite/gdb.ada/mi_string_access.exp index 25c0490c027..e29e17dd4f4 100644 --- a/gdb/testsuite/gdb.ada/mi_string_access.exp +++ b/gdb/testsuite/gdb.ada/mi_string_access.exp @@ -29,7 +29,7 @@ foreach_gnat_encoding scenario flags {all minimal} { return -1 } - mi_clean_restart $binfile-$scenario + mi_clean_restart $::testfile-$scenario if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp index 018e3bc2552..6c222ff8512 100644 --- a/gdb/testsuite/gdb.ada/mi_task_arg.exp +++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional load_lib mi-support.exp set MIFLAGS "-i=mi" -if {[mi_clean_restart $binfile]} { +if {[mi_clean_restart $::testfile]} { return } diff --git a/gdb/testsuite/gdb.ada/mi_task_info.exp b/gdb/testsuite/gdb.ada/mi_task_info.exp index aa05a028d18..9895cfeb1e6 100644 --- a/gdb/testsuite/gdb.ada/mi_task_info.exp +++ b/gdb/testsuite/gdb.ada/mi_task_info.exp @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional load_lib mi-support.exp set MIFLAGS "-i=mi" -if {[mi_clean_restart $binfile]} { +if {[mi_clean_restart $::testfile]} { return } diff --git a/gdb/testsuite/gdb.ada/mi_var_access.exp b/gdb/testsuite/gdb.ada/mi_var_access.exp index 9bfaeffcf21..b595780e705 100644 --- a/gdb/testsuite/gdb.ada/mi_var_access.exp +++ b/gdb/testsuite/gdb.ada/mi_var_access.exp @@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != "" } { return -1 } -mi_clean_restart $binfile +mi_clean_restart $::testfile if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_var_array.exp b/gdb/testsuite/gdb.ada/mi_var_array.exp index a04673cac46..0ba90e789fc 100644 --- a/gdb/testsuite/gdb.ada/mi_var_array.exp +++ b/gdb/testsuite/gdb.ada/mi_var_array.exp @@ -29,7 +29,7 @@ foreach_gnat_encoding scenario flags {none all minimal} { return -1 } - mi_clean_restart $binfile-$scenario + mi_clean_restart $::testfile-$scenario if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_var_union.exp b/gdb/testsuite/gdb.ada/mi_var_union.exp index 99882cf9558..b1988006164 100644 --- a/gdb/testsuite/gdb.ada/mi_var_union.exp +++ b/gdb/testsuite/gdb.ada/mi_var_union.exp @@ -31,7 +31,7 @@ foreach_gnat_encoding scenario flags {none all minimal} { return -1 } - mi_clean_restart $binfile-$scenario + mi_clean_restart $::testfile-$scenario if {[mi_runto_main] < 0} { return 0 diff --git a/gdb/testsuite/gdb.ada/mi_variant.exp b/gdb/testsuite/gdb.ada/mi_variant.exp index 4c71f16113f..18693cebefb 100644 --- a/gdb/testsuite/gdb.ada/mi_variant.exp +++ b/gdb/testsuite/gdb.ada/mi_variant.exp @@ -30,7 +30,7 @@ foreach_gnat_encoding scenario flags {none all minimal} { return -1 } - mi_clean_restart $binfile-$scenario + mi_clean_restart $::testfile-$scenario if {[mi_runto_main] < 0} { return 0