[committed][gdb/testsuite] Be more verbose about abort in gdb_breakpoint
Tom de Vries
tdevries@suse.de
Fri Oct 16 09:39:41 GMT 2020
Hi,
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.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Be more verbose about abort in gdb_breakpoint
gdb/testsuite/ChangeLog:
2020-10-16 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (gdb_breakpoint): Handle eof as in gdb_test_multiple.
---
gdb/testsuite/lib/gdb.exp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 63ba8008c3..ed647c99ed 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)"
}
More information about the Gdb-patches
mailing list