Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Be more verbose about abort in gdb_breakpoint
Date: Fri, 16 Oct 2020 11:39:41 +0200	[thread overview]
Message-ID: <20201016093940.GA9582@delia> (raw)

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)"
 		}

                 reply	other threads:[~2020-10-16  9:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201016093940.GA9582@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox