From: Pedro Alves <pedro@palves.net>
To: "Denio, Mike" <miked@ti.com>, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Issue with multiple threads using remote protocol on riscv32
Date: Wed, 16 Mar 2022 14:58:14 +0000 [thread overview]
Message-ID: <4f443800-59d7-5e87-f89e-b2d574ed071a@palves.net> (raw)
In-Reply-To: <0f242330e5e242dea1957fbab47a6473@ti.com>
Hi!
On 2022-03-16 14:45, Denio, Mike via Gdb wrote:
> (gdb) c -a&
>
> 'vCont;c:1' --->
> <--- '$OK#9a'
> <--- '%Stop:T05thread:1;#b7' // THIS STOP IS LOST BECAUSE GDB IMMEDIATELY TELLS THREAD 1 TO CONTINUE
This stop hasn't been acknowledged yet with vStopped at this point, so ...
> 'vCont;c' --->
> <--- '$OK#9a'
... from this 'vCont;c''s perspective, thread 1 is still running, so the server should ignore the 'c' action for thread 1.
gdbserver does this here, in linux-low.c::linux_set_resume_request
...
/* If the thread has a pending event that has already been
reported to GDBserver core, but GDB has not pulled the
event out of the vStopped queue yet, likewise, ignore the
(wildcard) resume request. */
if (in_queued_stop_replies (thread->id))
{
threads_debug_printf
("not resuming LWP %ld: has queued stop reply",
lwpid_of (thread));
continue;
}
...
Pedro Alves
next prev parent reply other threads:[~2022-03-16 14:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 14:45 Denio, Mike
2022-03-16 14:58 ` Pedro Alves [this message]
2022-03-16 15:10 ` [EXTERNAL] " Denio, Mike
2022-03-17 17:52 ` Pedro Alves
2022-03-17 19:11 ` Denio, Mike
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=4f443800-59d7-5e87-f89e-b2d574ed071a@palves.net \
--to=pedro@palves.net \
--cc=gdb@sourceware.org \
--cc=miked@ti.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).