Issue with multiple threads using remote protocol on riscv32
Pedro Alves
pedro@palves.net
Wed Mar 16 14:58:14 GMT 2022
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
More information about the Gdb
mailing list