From: Tom de Vries Date: Fri, 16 Oct 2020 09:39:02 +0000 (+0200) Subject: [gdb/testsuite] Be more verbose about abort in gdb_breakpoint X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afe75f6d9fd06739ef4c294a792041a9b6c5bf7b;p=binutils-gdb.git [gdb/testsuite] Be more verbose about abort in gdb_breakpoint I noticed that an abort when setting a breakpoint does not result in more than: ... (gdb) break 27^M FAIL: gdb.a/b.exp: setting breakpoint at 27 (eof) ... Handle this more verbosely, as is done in gdb_test_multiple, such that we have instead: ... (gdb) break 27^M ERROR: GDB process no longer exists GDB process exited with wait status 29309 exp9 0 0 CHILDKILLED SIGABRT SIGABRT UNRESOLVED: gdb.a/b.exp: setting breakpoint at 27 (eof) ... Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-10-16 Tom de Vries * lib/gdb.exp (gdb_breakpoint): Handle eof as in gdb_test_multiple. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index fd8d921fdc2..4086f16d242 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-10-16 Tom de Vries + + * lib/gdb.exp (gdb_breakpoint): Handle eof as in gdb_test_multiple. + 2020-10-14 Tom de Vries PR testsuite/26732 diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 63ba8008c3d..ed647c99ed9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -565,6 +565,10 @@ proc gdb_breakpoint { function args } { return 0 } eof { + perror "GDB process no longer exists" + global gdb_spawn_id + set wait_status [wait -i $gdb_spawn_id] + verbose -log "GDB process exited with wait status $wait_status" if { $print_fail } { fail "$test_name (eof)" }