mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" \
|
||||
|
||||
@@ -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" \
|
||||
|
||||
@@ -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" \
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
############################################
|
||||
|
||||
@@ -81,7 +81,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
|
||||
}
|
||||
|
||||
if { $supported == 0 } {
|
||||
return 0
|
||||
return
|
||||
}
|
||||
|
||||
gdb_test "p get(\"Hello world!\")" \
|
||||
|
||||
@@ -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" \
|
||||
|
||||
@@ -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\"" \
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -29,7 +29,7 @@ set MIFLAGS "-i=mi"
|
||||
mi_clean_restart $::testfile
|
||||
|
||||
if {[mi_runto_main] < 0} {
|
||||
return 0
|
||||
return
|
||||
}
|
||||
|
||||
mi_delete_breakpoints
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -31,7 +31,7 @@ set MIFLAGS "-i=mi"
|
||||
mi_clean_restart $::testfile
|
||||
|
||||
if {[mi_runto_main] < 0} {
|
||||
return 0
|
||||
return
|
||||
}
|
||||
|
||||
mi_delete_breakpoints
|
||||
|
||||
@@ -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".
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -35,7 +35,7 @@ if {[mi_clean_restart $::testfile]} {
|
||||
####################################
|
||||
|
||||
if {![mi_runto "task_switch.break_me"]} {
|
||||
return 0
|
||||
return
|
||||
}
|
||||
|
||||
set ada_task_info_hdr \
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user