More "return" cleanup in gdb.ada

I found some more spots in gdb.ada where a "return" has a value but
does not need one.  This patch cleans these up.

Most of these would be eliminated by the old "critical" idea, if I
ever got around to finishing that...

Approved-by: Kevin Buettner <kevinb@redhat.com>
This commit is contained in:
Tom Tromey
2025-10-03 12:14:32 -06:00
parent 4cbb6ca055
commit 62df070dd4
24 changed files with 28 additions and 28 deletions

View File

@@ -34,7 +34,7 @@ clean_restart ${testfile}
# Start the inferior
if {![runto_main]} {
return 0
return
}
# Create a breakpoint in each function from which we want to test

View File

@@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" }
clean_restart ${testfile}
if {![runto_main]} {
return 0
return
}
# Check that inserting breakpoint on read_small inlined function inserts

View File

@@ -35,7 +35,7 @@ set sp "\[ \t\]*"
# - continue, the program exits.
if {![runto_main]} {
return 0
return
}
gdb_test "catch assert if Global_Var = 2" \

View File

@@ -41,7 +41,7 @@ set catch_exception_info \
####################################
if {![runto_main]} {
return 0
return
}
gdb_test "catch exception" \
@@ -79,7 +79,7 @@ gdb_test "continue" \
# - continue, the program exits.
if {![runto_main]} {
return 0
return
}
gdb_test "catch exception Program_Error" \
@@ -139,7 +139,7 @@ gdb_test "continue" \
# the program.
if {![runto_main]} {
return 0
return
}
gdb_test "tcatch exception" \

View File

@@ -66,7 +66,7 @@ clean_restart ${testfile}
gdb_load_shlib $sofile
if {![runto_main]} {
return 0
return
}
gdb_test "catch exception some_kind_of_error" \

View File

@@ -41,7 +41,7 @@ set catchpoint_storage_error_msg \
"Catchpoint $decimal, exception at $hex in foo \\\(\\\).*at .*foo.adb:$decimal$eol$decimal$sp$when Storage_Error =>"
if {![runto_main]} {
return 0
return
}
############################################

View File

@@ -81,7 +81,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
}
if { $supported == 0 } {
return 0
return
}
gdb_test "p get(\"Hello world!\")" \

View File

@@ -26,7 +26,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
clean_restart ${testfile}
if {![runto_main]} {
return 0
return
}
gdb_test "info exceptions" \

View File

@@ -39,7 +39,7 @@ mi_clean_restart $::testfile
# - continue, the program exits.
if {[mi_runto_main] < 0} {
return 0
return
}
mi_gdb_test "-catch-assert -c \"Global_Var = 2\"" \

View File

@@ -38,7 +38,7 @@ mi_clean_restart $::testfile
with_test_prefix "scenario 1" {
if {[mi_runto_main] < 0} {
return 0
return
}
}
@@ -96,7 +96,7 @@ continue_to_exception \
with_test_prefix "scenario 2" {
mi_delete_breakpoints
if {[mi_runto_main] < 0} {
return 0
return
}
}

View File

@@ -34,7 +34,7 @@ mi_clean_restart $::testfile
with_test_prefix "scenario 1" {
if {[mi_runto_main] < 0} {
return 0
return
}
}
@@ -86,7 +86,7 @@ continue_to_exception_handler \
with_test_prefix "scenario 2" {
mi_delete_breakpoints
if {[mi_runto_main] < 0} {
return 0
return
}
}

View File

@@ -29,7 +29,7 @@ set MIFLAGS "-i=mi"
mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return 0
return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]

View File

@@ -29,7 +29,7 @@ set MIFLAGS "-i=mi"
mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return 0
return
}
mi_delete_breakpoints

View File

@@ -31,7 +31,7 @@ set MIFLAGS "-i=mi"
mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return 0
return
}
set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]

View File

@@ -31,7 +31,7 @@ set MIFLAGS "-i=mi"
mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return 0
return
}
mi_delete_breakpoints

View File

@@ -29,7 +29,7 @@ set MIFLAGS "-i=mi"
mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return 0
return
}
# Continue until STOP_1, and create a varobj for variables "A" and "B".

View File

@@ -32,7 +32,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
mi_clean_restart $::testfile-$scenario
if {[mi_runto_main] < 0} {
return 0
return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/bar.adb]

View File

@@ -34,7 +34,7 @@ if {[mi_clean_restart $::testfile]} {
mi_gdb_test "-gdb-set debug-file-directory \"\"" ".*"
if {![mi_runto "task_switch.break_me"]} {
return 0
return
}
# Verify that "-stack-list-arguments" does not cause the debugger to

View File

@@ -35,7 +35,7 @@ if {[mi_clean_restart $::testfile]} {
####################################
if {![mi_runto "task_switch.break_me"]} {
return 0
return
}
set ada_task_info_hdr \

View File

@@ -29,7 +29,7 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != "" } {
mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
return 0
return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/mi_access.adb]

View File

@@ -32,7 +32,7 @@ foreach_gnat_encoding scenario flags {none all minimal} {
mi_clean_restart $::testfile-$scenario
if {[mi_runto_main] < 0} {
return 0
return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/bar.adb]

View File

@@ -34,7 +34,7 @@ foreach_gnat_encoding scenario flags {none all minimal} {
mi_clean_restart $::testfile-$scenario
if {[mi_runto_main] < 0} {
return 0
return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/bar.adb]

View File

@@ -33,7 +33,7 @@ foreach_gnat_encoding scenario flags {none all minimal} {
mi_clean_restart $::testfile-$scenario
if {[mi_runto_main] < 0} {
return 0
return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/pkg.adb]

View File

@@ -34,7 +34,7 @@ gdb_test_multiple {print "a" = "a"} $test {
-re " = false\r\n$gdb_prompt $" {
kfail ada/12607 $test
untested ${testdir}.exp
return 0
return
}
-re " = true\r\n$gdb_prompt $" {
pass $test