[lldb] [gdb-remote] Send interrupt packets from async thread
authorMichał Górny <mgorny@moritz.systems>
Wed, 3 Aug 2022 15:39:24 +0000 (17:39 +0200)
committerMichał Górny <mgorny@moritz.systems>
Wed, 3 Aug 2022 16:40:25 +0000 (18:40 +0200)
commit446b61cff4ea0cb7e7fcc5e0fec7bc749d379b08
treed5c5dbff571a65cca5fecbc5b4c6e83806e9c58e
parent3b217f2f127ebf5da5b87485dd9bc33ae1a66427
[lldb] [gdb-remote] Send interrupt packets from async thread

Refactor the mechanism for sending interrupt packets to send them
from async thread (i.e. the same thread that sends the continue packet
preceding them and that waits for the response), rather than from
the thread requesting the interrupt.  This is going to become especially
important when using the vCtrlC packet as part of the non-stop protocol,
as -- unlike the simple ^c sent in the all-stop mode -- this packet
involves an explicit reply.

Suggested by Pavel Labath in D126614.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D131075
lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h