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.
---
.../gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp | 2 +-
gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp | 2 +-
gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp | 2 +-
gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp | 2 +-
gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp | 4 ++--
gdb/testsuite/gdb.dwarf2/gdb-index.exp | 2 +-
gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp | 2 +-
gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp | 2 +-
gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp | 2 +-
gdb/testsuite/gdb.dwarf2/loclists-start-end.exp | 2 +-
gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp | 2 +-
gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp | 2 +-
gdb/testsuite/gdb.dwarf2/struct-with-sig-2.exp | 2 +-
13 files changed, 14 insertions(+), 14 deletions(-)
@@ -59,11 +59,11 @@ Dwarf::assemble $asm_file {
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
}
}
set readnow_p [readnow]
@@ -23,11 +23,11 @@ load_lib dwarf.exp
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.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
@@ -44,11 +44,11 @@ set command "$objcopy_program -N block_start -N block_end -N break_at ${binfile}
verbose -log "Executing: $command"
set result [catch {exec {*}$command} output]
verbose "result is $result"
verbose "output is $output"
if {$result != 0} {
- return -1
+ return
}
gdb_load ${binfile_stripped}
if {![runto "*${break_at}"]} {
@@ -93,11 +93,11 @@ gdb_test "frame" ".*main \\\(\\\) at \[^\r\n\]*:$prologue_end_line\r\n.*"
with_test_prefix "ignore-prologue-end" {
clean_restart $::testfile
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
# of main which assigns m.
set prologue_end_line [gdb_get_line_number "main assign m"]
@@ -25,16 +25,16 @@ standard_testfile main.c
# First check whether we can actually handle the non-symlink case.
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
}
}
# Regenerate exec without index.
if { [prepare_for_testing "failed to prepare" "${testfile}" \
@@ -115,11 +115,11 @@ gdb_test_multiple $cmd $test {
}
-re "(Psymtabs|Cooked).*${gdb_prompt} $" {
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} $" {
fail "unrecognized symbol reader"
}
@@ -95,11 +95,11 @@ 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] } {
return
}
@@ -122,11 +122,11 @@ 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] } {
return
}
@@ -210,11 +210,11 @@ 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] } {
return
}
@@ -113,11 +113,11 @@ 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] } {
return
}
@@ -90,11 +90,11 @@ 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.
gdb_test "p/x &foo" " = 0x3000"
}
@@ -129,11 +129,11 @@ 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.
gdb_test "p/x &foo" " = 0x4000"
gdb_test "p/x &bar" " = 0x5000"
@@ -122,11 +122,11 @@ Dwarf::assemble $asm_file {
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
}
}
set re "DWARF Error: .debug_types section not supported in dwz file"
gdb_assert { [regexp $re $gdb_file_cmd_msg] } "Dwarf Error message"