From: Tom Tromey <tom@tromey.com>
To: Stephan Rohr <stephan.rohr@intel.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: fix assertion when interrupting an empty remote target
Date: Thu, 03 Sep 2026 11:39:32 -0600 [thread overview]
Message-ID: <878q5i2q0b.fsf@tromey.com> (raw)
In-Reply-To: <20260805085919.218925-2-stephan.rohr@intel.com> (Stephan Rohr's message of "Wed, 5 Aug 2026 08:59:17 +0000")
>>>>> Stephan Rohr <stephan.rohr@intel.com> writes:
> From: "Rohr, Stephan" <stephan.rohr@intel.com>
> GDB asserts when sending an interrupt to an empty remote target, e.g.
> use stdio to connect to a remote target in non-stop mode:
> 'gdb -ex "set non-stop on" -ex "target extended-remote | gdbserver
> --multi --once -'
> Interrupting the target triggers an assertion in 'find_inferior_pid'.
> Fix by checking for a valid thread in 'interrupt_target_1' for 'non-stop'
> mode.
Thanks. The patch itself looks ok but I had a few nits with the test.
> diff --git a/gdb/testsuite/gdb.server/interrupt-empty-remote-target.exp b/gdb/testsuite/gdb.server/interrupt-empty-remote-target.exp
> new file mode 100644
> index 00000000000..34437a17d90
> --- /dev/null
> +++ b/gdb/testsuite/gdb.server/interrupt-empty-remote-target.exp
> @@ -0,0 +1,40 @@
> +# Copyright 2024 Free Software Foundation, Inc.
2026
> +standard_testfile server.c
> +
> +if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
> + return -1
> +}
Is an executable even needed?
Also, plain 'return' here.
thanks,
Tom
next prev parent reply other threads:[~2026-09-03 17:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 8:59 [PATCH 0/2] gdb: improve " Stephan Rohr
2026-08-05 8:59 ` [PATCH 1/2] gdb: fix assertion when " Stephan Rohr
2026-09-03 17:39 ` Tom Tromey [this message]
2026-08-05 8:59 ` [PATCH 2/2] gdb, remote: Skip sending of 'vCont' package if remote target is empty Stephan Rohr
2026-09-03 17:43 ` Tom Tromey
2026-08-17 14:37 ` [PATCH 0/2] gdb: improve interrupting an empty remote target Rohr, Stephan
2026-09-02 20:12 ` [Ping] " Rohr, Stephan
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=878q5i2q0b.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=stephan.rohr@intel.com \
/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