diff options
author | Tom Tromey <tromey@adacore.com> | 2025-10-03 12:14:32 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2025-10-06 07:36:58 -0600 |
commit | 62df070dd4589c7448d68ec9f1036cc7b73f6af6 (patch) | |
tree | 6d8e5140f6f5eeaf7a5353ff2df56eb3116f1e93 | |
parent | 4cbb6ca05573754cda022edd9747697b99557ee1 (diff) | |
download | binutils-62df070dd4589c7448d68ec9f1036cc7b73f6af6.zip binutils-62df070dd4589c7448d68ec9f1036cc7b73f6af6.tar.gz binutils-62df070dd4589c7448d68ec9f1036cc7b73f6af6.tar.bz2 |
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>
24 files changed, 28 insertions, 28 deletions
diff --git a/gdb/testsuite/gdb.ada/array_return.exp b/gdb/testsuite/gdb.ada/array_return.exp index a27c8f3..21a75d8 100644 --- a/gdb/testsuite/gdb.ada/array_return.exp +++ b/gdb/testsuite/gdb.ada/array_return.exp @@ -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 diff --git a/gdb/testsuite/gdb.ada/bp_inlined_func.exp b/gdb/testsuite/gdb.ada/bp_inlined_func.exp index 4d772ff..3bab85a 100644 --- a/gdb/testsuite/gdb.ada/bp_inlined_func.exp +++ b/gdb/testsuite/gdb.ada/bp_inlined_func.exp @@ -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 diff --git a/gdb/testsuite/gdb.ada/catch_assert_if.exp b/gdb/testsuite/gdb.ada/catch_assert_if.exp index 2ac47d1..eca657f 100644 --- a/gdb/testsuite/gdb.ada/catch_assert_if.exp +++ b/gdb/testsuite/gdb.ada/catch_assert_if.exp @@ -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" \ diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp index 5ac06ca..34f3202 100644 --- a/gdb/testsuite/gdb.ada/catch_ex.exp +++ b/gdb/testsuite/gdb.ada/catch_ex.exp @@ -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" \ diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp index fb12c76..d1f17f8 100644 --- a/gdb/testsuite/gdb.ada/catch_ex_std.exp +++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp @@ -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" \ diff --git a/gdb/testsuite/gdb.ada/excep_handle.exp b/gdb/testsuite/gdb.ada/excep_handle.exp index 624725d..40047f4 100644 --- a/gdb/testsuite/gdb.ada/excep_handle.exp +++ b/gdb/testsuite/gdb.ada/excep_handle.exp @@ -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 } ############################################ diff --git a/gdb/testsuite/gdb.ada/funcall_ref.exp b/gdb/testsuite/gdb.ada/funcall_ref.exp index cc34a0b..8e6bbc6 100644 --- a/gdb/testsuite/gdb.ada/funcall_ref.exp +++ b/gdb/testsuite/gdb.ada/funcall_ref.exp @@ -81,7 +81,7 @@ foreach_gnat_encoding scenario flags {all minimal} { } if { $supported == 0 } { - return 0 + return } gdb_test "p get(\"Hello world!\")" \ diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp index ab2d95c..b3ed995 100644 --- a/gdb/testsuite/gdb.ada/info_exc.exp +++ b/gdb/testsuite/gdb.ada/info_exc.exp @@ -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" \ diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert.exp b/gdb/testsuite/gdb.ada/mi_catch_assert.exp index 8fa02bd..d011ca5 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_assert.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_assert.exp @@ -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\"" \ diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp index 5b2fddc..974da0d 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp @@ -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 } } diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp index b4251ab..f853f6b 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp @@ -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 } } diff --git a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp index c96d095..6dded25 100644 --- a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp +++ b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp @@ -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] diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp index 9227973..5358fcf 100644 --- a/gdb/testsuite/gdb.ada/mi_exc_info.exp +++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp @@ -29,7 +29,7 @@ set MIFLAGS "-i=mi" mi_clean_restart $::testfile if {[mi_runto_main] < 0} { - return 0 + return } mi_delete_breakpoints diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp index e74db35..e638f97 100644 --- a/gdb/testsuite/gdb.ada/mi_interface.exp +++ b/gdb/testsuite/gdb.ada/mi_interface.exp @@ -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] diff --git a/gdb/testsuite/gdb.ada/mi_prot.exp b/gdb/testsuite/gdb.ada/mi_prot.exp index ba0c311..5e3f160 100644 --- a/gdb/testsuite/gdb.ada/mi_prot.exp +++ b/gdb/testsuite/gdb.ada/mi_prot.exp @@ -31,7 +31,7 @@ set MIFLAGS "-i=mi" mi_clean_restart $::testfile if {[mi_runto_main] < 0} { - return 0 + return } mi_delete_breakpoints diff --git a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp index 86bab64..a2813d4 100644 --- a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp +++ b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp @@ -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". diff --git a/gdb/testsuite/gdb.ada/mi_string_access.exp b/gdb/testsuite/gdb.ada/mi_string_access.exp index cbed828..3a54e94 100644 --- a/gdb/testsuite/gdb.ada/mi_string_access.exp +++ b/gdb/testsuite/gdb.ada/mi_string_access.exp @@ -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] diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp index 54534e8..31ef7d0 100644 --- a/gdb/testsuite/gdb.ada/mi_task_arg.exp +++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp @@ -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 diff --git a/gdb/testsuite/gdb.ada/mi_task_info.exp b/gdb/testsuite/gdb.ada/mi_task_info.exp index c69af43..3b1a37e 100644 --- a/gdb/testsuite/gdb.ada/mi_task_info.exp +++ b/gdb/testsuite/gdb.ada/mi_task_info.exp @@ -35,7 +35,7 @@ if {[mi_clean_restart $::testfile]} { #################################### if {![mi_runto "task_switch.break_me"]} { - return 0 + return } set ada_task_info_hdr \ diff --git a/gdb/testsuite/gdb.ada/mi_var_access.exp b/gdb/testsuite/gdb.ada/mi_var_access.exp index 50b90f1..72a7f36 100644 --- a/gdb/testsuite/gdb.ada/mi_var_access.exp +++ b/gdb/testsuite/gdb.ada/mi_var_access.exp @@ -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] diff --git a/gdb/testsuite/gdb.ada/mi_var_array.exp b/gdb/testsuite/gdb.ada/mi_var_array.exp index d8b565d..15a01a5 100644 --- a/gdb/testsuite/gdb.ada/mi_var_array.exp +++ b/gdb/testsuite/gdb.ada/mi_var_array.exp @@ -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] diff --git a/gdb/testsuite/gdb.ada/mi_var_union.exp b/gdb/testsuite/gdb.ada/mi_var_union.exp index 0cc792c..9ae020f 100644 --- a/gdb/testsuite/gdb.ada/mi_var_union.exp +++ b/gdb/testsuite/gdb.ada/mi_var_union.exp @@ -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] diff --git a/gdb/testsuite/gdb.ada/mi_variant.exp b/gdb/testsuite/gdb.ada/mi_variant.exp index 4ad9a6c..6622cb1 100644 --- a/gdb/testsuite/gdb.ada/mi_variant.exp +++ b/gdb/testsuite/gdb.ada/mi_variant.exp @@ -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] diff --git a/gdb/testsuite/gdb.ada/str_ref_cmp.exp b/gdb/testsuite/gdb.ada/str_ref_cmp.exp index fa3370f..a3362bf 100644 --- a/gdb/testsuite/gdb.ada/str_ref_cmp.exp +++ b/gdb/testsuite/gdb.ada/str_ref_cmp.exp @@ -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 |