diff options
author | Jim Ingham <jingham@apple.com> | 2021-05-06 14:14:35 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2021-05-11 11:57:08 -0700 |
commit | 9558b602b22cb7d681757c5f56d941e39a9d9d19 (patch) | |
tree | c809fffa7f196e50c95e001c1deab085d06b577d /lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | |
parent | 384dd9ddaf616a1563ee1c1a8a1347b7658e7a70 (diff) | |
download | llvm-9558b602b22cb7d681757c5f56d941e39a9d9d19.zip llvm-9558b602b22cb7d681757c5f56d941e39a9d9d19.tar.gz llvm-9558b602b22cb7d681757c5f56d941e39a9d9d19.tar.bz2 |
Add an "interrupt timeout" to Process, and pipe that through the
ProcessGDBRemote plugin layers.
Also fix a bug where if we tried to interrupt, but the ReadPacket
wakeup timer woke us up just after the timeout, we would break out
the switch, but then since we immediately check if the response is
empty & fail if it is, we could end up actually only giving a
small interval to the interrupt.
Differential Revision: https://reviews.llvm.org/D102085
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp')
-rw-r--r-- | lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp index 4eeec62..803a9b9 100644 --- a/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp +++ b/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp @@ -385,8 +385,9 @@ TEST_F(GDBRemoteCommunicationClientTest, SendTraceSupportedPacket) { TraceSupportedResponse trace_type; std::string error_message; auto callback = [&] { + std::chrono::seconds timeout(10); if (llvm::Expected<TraceSupportedResponse> trace_type_or_err = - client.SendTraceSupported()) { + client.SendTraceSupported(timeout)) { trace_type = *trace_type_or_err; error_message = ""; return true; |