]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: testsuite: DWARF: Don't return -1 from top-level (manual)
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Wed, 29 Apr 2026 23:04:10 +0000 (20:04 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 8 May 2026 21:55:59 +0000 (18:55 -0300)
This patch manually changes "return -1" statements that weren't caught
by the sed command.

These return statements fall into one of these criteria:

- misaligned line, which is then fixed by this patch;
- return at top level but inside block such as save_vars,
  with_test_prefix, foreach, gdb_test_multiple.

Some weren't changed because they didn't meet the criteria above, or
weren't trivial to check.

Approved-By: Tom Tromey <tom@tromey.com>
13 files changed:
gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp
gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
gdb/testsuite/gdb.dwarf2/gdb-index.exp
gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp

index 250f479e027448a9e40b91c990e52cde83f55826..9432415fdd0dfcb11ea74e62622a6d245fc07df8 100644 (file)
@@ -61,7 +61,7 @@ save_vars { GDBFLAGS } {
     append GDBFLAGS " -iex \"maint set dwarf synchronous on\""
     if { [prepare_for_testing "failed to prepare" ${testfile} \
              [list $srcfile $asm_file] {nodebug}] } {
-       return -1
+       return
     }
 }
 
index fa3bf5f4b3e0eeec6cb719d1ce75f84df601e1f5..1be466f513c78ab276ee59c1193adc8b8fd72163 100644 (file)
@@ -25,7 +25,7 @@ require dwarf2_support
 standard_testfile .c -dw.S
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
-       return -1
+    return
 }
 
 # Make some DWARF for the test.
index 7f9f9464aaf5516c8665e8b17dad71bd4df7504a..e6859159c2914cce736ea4704f84c38879c83fc7 100644 (file)
@@ -46,7 +46,7 @@ set result [catch {exec {*}$command} output]
 verbose "result is $result"
 verbose "output is $output"
 if {$result != 0} {
-  return -1
+    return
 }
 
 gdb_load ${binfile_stripped}
index 294e7c8bf45f92fea31f8040739940f4c04bc991..8032f71c7d9c49bf24e8bf0fdae5c2bb15c9cc43 100644 (file)
@@ -95,7 +95,7 @@ with_test_prefix "ignore-prologue-end" {
     gdb_test_no_output "maintenance set ignore-prologue-end-flag on"
 
     if {![runto_main]} {
-       return -1
+       return
     }
 
     # If we ignore the prologue-end flag, we should stop at the first statement
index 6d3bf29c1b101a62c1bc73663d83ba087120d4c9..94afa35f5588c8785e80d55e7d63232f1ecb2d81 100644 (file)
@@ -27,12 +27,12 @@ standard_testfile main.c
 with_test_prefix non-symlink {
     if { [prepare_for_testing "failed to prepare" "${testfile}" \
              [list ${srcfile}]] } {
-       return -1
+       return
     }
 
     if { [ensure_gdb_index $binfile] == -1 } {
        untested "error adding gdb index"
-       return -1
+       return
     }
 }
 
index 456d7266c5994a2b17058e109d23a137216387b7..6ff1209ad1b6d9b8002f3d986e3d52af45ac0e56 100644 (file)
@@ -117,7 +117,7 @@ gdb_test_multiple $cmd $test {
        lassign [local_add_gdb_index $binfile] binfile_with_index host_binfile_with_index
        set testfile_with_index [file tail $binfile_with_index]
        if { ${binfile_with_index} == "" } {
-           return -1
+           return
        }
     }
     -re ".*${gdb_prompt} $" {
index f2a244791d16644a81f538d2171664f4579d8a46..edfcb8842d10aee982390f3ed76a6980765c360b 100644 (file)
@@ -97,7 +97,7 @@ foreach_with_prefix is_64 {false true} {
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
              [list $srcfile $asm_file] {nodebug}] } {
-       return -1
+       return
     }
 
     if { ![runto_main] } {
index a822f0c2f2e9f01d379e46eb4cda3910b5644ef1..e2bacbcb8dc086510b9ed53dd2dd2220a0023a3b 100644 (file)
@@ -124,7 +124,7 @@ foreach_with_prefix is_64 {false true} {
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
              [list $srcfile $asm_file] {nodebug}] } {
-       return -1
+       return
     }
 
     if { ![runto_main] } {
index b80639b32ddddb98faeedb2bc602775bbfdb2b1b..bc64b7adabd4e04ddb72d05d61e3c3693118e20b 100644 (file)
@@ -212,7 +212,7 @@ foreach_with_prefix is_64 {false true} {
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
              [list $srcfile $asm_file] {nodebug}] } {
-       return -1
+       return
     }
 
     if { ![runto_main] } {
index f40d6fd8ec5cf637d00822aeddc8af8ff9131488..c8d9f123625f029e90a78d32276d404b08b25347 100644 (file)
@@ -115,7 +115,7 @@ foreach_with_prefix is_64 {false true} {
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
              [list $srcfile $asm_file] {nodebug}] } {
-       return -1
+       return
     }
 
     if { ![runto_main] } {
index d005c8b907cce9a1da7c3ae26d70d899dd9db5bb..e48eb39f3a59d7eb5f484763d1701fa3816047d9 100644 (file)
@@ -92,7 +92,7 @@ foreach_with_prefix is_64 {false true} {
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
              [list $srcfile $asm_file] {nodebug}] } {
-       return -1
+       return
     }
 
     # Sanity checks to make sure GDB slurped the symbols correctly.
index bbfc9e35c6463ab0838c67db213ddb5ba7c08858..6207e31b9d0f15ce835b38a77ae1a14457844394 100644 (file)
@@ -131,7 +131,7 @@ foreach_with_prefix is_64 {false true} {
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
              [list $srcfile $asm_file] {nodebug}] } {
-       return -1
+       return
     }
 
     # Sanity checks to make sure GDB slurped the symbols correctly.
index 4218dd1194705884e36a7565c9e35334e5a1192a..28a2fd7ad58cd623db81f11fe15564251dc752bd 100644 (file)
@@ -124,7 +124,7 @@ save_vars { GDBFLAGS } {
 
     if { [prepare_for_testing "failed to prepare" ${testfile} \
              [list $srcfile $asm_file] {nodebug}] } {
-       return -1
+       return
     }
 }