LLDB  mainline
GDBRemoteClientBase.cpp
Go to the documentation of this file.
1 //===-- GDBRemoteClientBase.cpp -------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "GDBRemoteClientBase.h"
10 
11 #include "llvm/ADT/StringExtras.h"
12 
15 
16 #include "ProcessGDBRemoteLog.h"
17 
18 using namespace lldb;
19 using namespace lldb_private;
20 using namespace lldb_private::process_gdb_remote;
21 using namespace std::chrono;
22 
23 // When we've sent a continue packet and are waiting for the target to stop,
24 // we wake up the wait with this interval to make sure the stub hasn't gone
25 // away while we were waiting.
26 static const seconds kWakeupInterval(5);
27 
28 /////////////////////////
29 // GDBRemoteClientBase //
30 /////////////////////////
31 
32 GDBRemoteClientBase::ContinueDelegate::~ContinueDelegate() = default;
33 
34 GDBRemoteClientBase::GDBRemoteClientBase(const char *comm_name,
35  const char *listener_name)
36  : GDBRemoteCommunication(comm_name, listener_name), m_async_count(0),
37  m_is_running(false), m_should_stop(false) {}
38 
40  ContinueDelegate &delegate, const UnixSignals &signals,
41  llvm::StringRef payload, std::chrono::seconds interrupt_timeout,
42  StringExtractorGDBRemote &response) {
44  response.Clear();
45 
46  {
47  std::lock_guard<std::mutex> lock(m_mutex);
48  m_continue_packet = std::string(payload);
49  m_should_stop = false;
50  }
51  ContinueLock cont_lock(*this);
52  if (!cont_lock)
53  return eStateInvalid;
54  OnRunPacketSent(true);
55  // The main ReadPacket loop wakes up at computed_timeout intervals, just to
56  // check that the connection hasn't dropped. When we wake up we also check
57  // whether there is an interrupt request that has reached its endpoint.
58  // If we want a shorter interrupt timeout that kWakeupInterval, we need to
59  // choose the shorter interval for the wake up as well.
60  std::chrono::seconds computed_timeout = std::min(interrupt_timeout,
62  for (;;) {
63  PacketResult read_result = ReadPacket(response, computed_timeout, false);
64  // Reset the computed_timeout to the default value in case we are going
65  // round again.
66  computed_timeout = std::min(interrupt_timeout, kWakeupInterval);
67  switch (read_result) {
69  std::lock_guard<std::mutex> lock(m_mutex);
70  if (m_async_count == 0) {
71  continue;
72  }
73  auto cur_time = steady_clock::now();
74  if (cur_time >= m_interrupt_endpoint)
75  return eStateInvalid;
76  else {
77  // We woke up and found an interrupt is in flight, but we haven't
78  // exceeded the interrupt wait time. So reset the wait time to the
79  // time left till the interrupt timeout. But don't wait longer
80  // than our wakeup timeout.
81  auto new_wait = m_interrupt_endpoint - cur_time;
82  computed_timeout = std::min(kWakeupInterval,
83  std::chrono::duration_cast<std::chrono::seconds>(new_wait));
84  continue;
85  }
86  break;
87  }
89  break;
90  default:
91  LLDB_LOGF(log, "GDBRemoteClientBase::%s () ReadPacket(...) => false",
92  __FUNCTION__);
93  return eStateInvalid;
94  }
95  if (response.Empty())
96  return eStateInvalid;
97 
98  const char stop_type = response.GetChar();
99  LLDB_LOGF(log, "GDBRemoteClientBase::%s () got packet: %s", __FUNCTION__,
100  response.GetStringRef().data());
101 
102  switch (stop_type) {
103  case 'W':
104  case 'X':
105  return eStateExited;
106  case 'E':
107  // ERROR
108  return eStateInvalid;
109  default:
110  LLDB_LOGF(log, "GDBRemoteClientBase::%s () unrecognized async packet",
111  __FUNCTION__);
112  return eStateInvalid;
113  case 'O': {
114  std::string inferior_stdout;
115  response.GetHexByteString(inferior_stdout);
116  delegate.HandleAsyncStdout(inferior_stdout);
117  break;
118  }
119  case 'A':
120  delegate.HandleAsyncMisc(
121  llvm::StringRef(response.GetStringRef()).substr(1));
122  break;
123  case 'J':
124  delegate.HandleAsyncStructuredDataPacket(response.GetStringRef());
125  break;
126  case 'T':
127  case 'S':
128  // Do this with the continue lock held.
129  const bool should_stop = ShouldStop(signals, response);
130  response.SetFilePos(0);
131 
132  // The packet we should resume with. In the future we should check our
133  // thread list and "do the right thing" for new threads that show up
134  // while we stop and run async packets. Setting the packet to 'c' to
135  // continue all threads is the right thing to do 99.99% of the time
136  // because if a thread was single stepping, and we sent an interrupt, we
137  // will notice above that we didn't stop due to an interrupt but stopped
138  // due to stepping and we would _not_ continue. This packet may get
139  // modified by the async actions (e.g. to send a signal).
140  m_continue_packet = 'c';
141  cont_lock.unlock();
142 
143  delegate.HandleStopReply();
144  if (should_stop)
145  return eStateStopped;
146 
147  switch (cont_lock.lock()) {
149  break;
151  return eStateInvalid;
153  return eStateStopped;
154  }
155  OnRunPacketSent(false);
156  break;
157  }
158  }
159 }
160 
162  int signo, std::chrono::seconds interrupt_timeout) {
163  Lock lock(*this, interrupt_timeout);
164  if (!lock || !lock.DidInterrupt())
165  return false;
166 
167  m_continue_packet = 'C';
168  m_continue_packet += llvm::hexdigit((signo / 16) % 16);
169  m_continue_packet += llvm::hexdigit(signo % 16);
170  return true;
171 }
172 
173 bool GDBRemoteClientBase::Interrupt(std::chrono::seconds interrupt_timeout) {
174  Lock lock(*this, interrupt_timeout);
175  if (!lock.DidInterrupt())
176  return false;
177  m_should_stop = true;
178  return true;
179 }
180 
183  llvm::StringRef payload, StringExtractorGDBRemote &response,
184  std::chrono::seconds interrupt_timeout) {
185  Lock lock(*this, interrupt_timeout);
186  if (!lock) {
187  if (Log *log =
189  LLDB_LOGF(log,
190  "GDBRemoteClientBase::%s failed to get mutex, not sending "
191  "packet '%.*s'",
192  __FUNCTION__, int(payload.size()), payload.data());
194  }
195 
196  return SendPacketAndWaitForResponseNoLock(payload, response);
197 }
198 
201  llvm::StringRef payload, StringExtractorGDBRemote &response,
202  std::chrono::seconds interrupt_timeout,
203  llvm::function_ref<void(llvm::StringRef)> output_callback) {
204  Lock lock(*this, interrupt_timeout);
205  if (!lock) {
206  if (Log *log =
208  LLDB_LOGF(log,
209  "GDBRemoteClientBase::%s failed to get mutex, not sending "
210  "packet '%.*s'",
211  __FUNCTION__, int(payload.size()), payload.data());
213  }
214 
215  PacketResult packet_result = SendPacketNoLock(payload);
216  if (packet_result != PacketResult::Success)
217  return packet_result;
218 
219  return ReadPacketWithOutputSupport(response, GetPacketTimeout(), true,
220  output_callback);
221 }
222 
225  llvm::StringRef payload, StringExtractorGDBRemote &response) {
226  PacketResult packet_result = SendPacketNoLock(payload);
227  if (packet_result != PacketResult::Success)
228  return packet_result;
229 
230  const size_t max_response_retries = 3;
231  for (size_t i = 0; i < max_response_retries; ++i) {
232  packet_result = ReadPacket(response, GetPacketTimeout(), true);
233  // Make sure we received a response
234  if (packet_result != PacketResult::Success)
235  return packet_result;
236  // Make sure our response is valid for the payload that was sent
237  if (response.ValidateResponse())
238  return packet_result;
239  // Response says it wasn't valid
241  LLDB_LOGF(
242  log,
243  "error: packet with payload \"%.*s\" got invalid response \"%s\": %s",
244  int(payload.size()), payload.data(), response.GetStringRef().data(),
245  (i == (max_response_retries - 1))
246  ? "using invalid response and giving up"
247  : "ignoring response and waiting for another");
248  }
249  return packet_result;
250 }
251 
253  StringExtractorGDBRemote &response) {
254  std::lock_guard<std::mutex> lock(m_mutex);
255 
256  if (m_async_count == 0)
257  return true; // We were not interrupted. The process stopped on its own.
258 
259  // Older debugserver stubs (before April 2016) can return two stop-reply
260  // packets in response to a ^C packet. Additionally, all debugservers still
261  // return two stop replies if the inferior stops due to some other reason
262  // before the remote stub manages to interrupt it. We need to wait for this
263  // additional packet to make sure the packet sequence does not get skewed.
264  StringExtractorGDBRemote extra_stop_reply_packet;
265  ReadPacket(extra_stop_reply_packet, milliseconds(100), false);
266 
267  // Interrupting is typically done using SIGSTOP or SIGINT, so if the process
268  // stops with some other signal, we definitely want to stop.
269  const uint8_t signo = response.GetHexU8(UINT8_MAX);
270  if (signo != signals.GetSignalNumberFromName("SIGSTOP") &&
271  signo != signals.GetSignalNumberFromName("SIGINT"))
272  return true;
273 
274  // We probably only stopped to perform some async processing, so continue
275  // after that is done.
276  // TODO: This is not 100% correct, as the process may have been stopped with
277  // SIGINT or SIGSTOP that was not caused by us (e.g. raise(SIGINT)). This will
278  // normally cause a stop, but if it's done concurrently with a async
279  // interrupt, that stop will get eaten (llvm.org/pr20231).
280  return false;
281 }
282 
284  if (first)
286 }
287 
288 ///////////////////////////////////////
289 // GDBRemoteClientBase::ContinueLock //
290 ///////////////////////////////////////
291 
293  : m_comm(comm), m_acquired(false) {
294  lock();
295 }
296 
298  if (m_acquired)
299  unlock();
300 }
301 
303  lldbassert(m_acquired);
304  {
305  std::unique_lock<std::mutex> lock(m_comm.m_mutex);
306  m_comm.m_is_running = false;
307  }
308  m_comm.m_cv.notify_all();
309  m_acquired = false;
310 }
311 
315  LLDB_LOGF(log, "GDBRemoteClientBase::ContinueLock::%s() resuming with %s",
316  __FUNCTION__, m_comm.m_continue_packet.c_str());
317 
318  lldbassert(!m_acquired);
319  std::unique_lock<std::mutex> lock(m_comm.m_mutex);
320  m_comm.m_cv.wait(lock, [this] { return m_comm.m_async_count == 0; });
321  if (m_comm.m_should_stop) {
322  m_comm.m_should_stop = false;
323  LLDB_LOGF(log, "GDBRemoteClientBase::ContinueLock::%s() cancelled",
324  __FUNCTION__);
325  return LockResult::Cancelled;
326  }
327  if (m_comm.SendPacketNoLock(m_comm.m_continue_packet) !=
329  return LockResult::Failed;
330 
331  lldbassert(!m_comm.m_is_running);
332  m_comm.m_is_running = true;
333  m_acquired = true;
334  return LockResult::Success;
335 }
336 
337 ///////////////////////////////
338 // GDBRemoteClientBase::Lock //
339 ///////////////////////////////
340 
342  std::chrono::seconds interrupt_timeout)
343  : m_async_lock(comm.m_async_mutex, std::defer_lock), m_comm(comm),
344  m_interrupt_timeout(interrupt_timeout), m_acquired(false),
345  m_did_interrupt(false) {
347  if (m_acquired)
348  m_async_lock.lock();
349 }
350 
353  std::unique_lock<std::mutex> lock(m_comm.m_mutex);
354  if (m_comm.m_is_running && m_interrupt_timeout == std::chrono::seconds(0))
355  return; // We were asked to avoid interrupting the sender. Lock is not
356  // acquired.
357 
358  ++m_comm.m_async_count;
359  if (m_comm.m_is_running) {
360  if (m_comm.m_async_count == 1) {
361  // The sender has sent the continue packet and we are the first async
362  // packet. Let's interrupt it.
363  const char ctrl_c = '\x03';
365  size_t bytes_written = m_comm.Write(&ctrl_c, 1, status, nullptr);
366  if (bytes_written == 0) {
367  --m_comm.m_async_count;
368  LLDB_LOGF(log, "GDBRemoteClientBase::Lock::Lock failed to send "
369  "interrupt packet");
370  return;
371  }
372  m_comm.m_interrupt_endpoint = steady_clock::now() + m_interrupt_timeout;
373  if (log)
374  log->PutCString("GDBRemoteClientBase::Lock::Lock sent packet: \\x03");
375  }
376  m_comm.m_cv.wait(lock, [this] { return !m_comm.m_is_running; });
377  m_did_interrupt = true;
378  }
379  m_acquired = true;
380 }
381 
383  if (!m_acquired)
384  return;
385  {
386  std::unique_lock<std::mutex> lock(m_comm.m_mutex);
387  --m_comm.m_async_count;
388  }
389  m_comm.m_cv.notify_one();
390 }
kWakeupInterval
static const seconds kWakeupInterval(5)
lldb_private::process_gdb_remote::GDBRemoteClientBase::ShouldStop
bool ShouldStop(const UnixSignals &signals, StringExtractorGDBRemote &response)
Definition: GDBRemoteClientBase.cpp:252
GDBRemoteClientBase.h
StringExtractor::SetFilePos
void SetFilePos(uint32_t idx)
Definition: StringExtractor.h:39
lldb_private::process_gdb_remote::GDBRemoteClientBase::m_async_mutex
std::recursive_mutex m_async_mutex
This handles the synchronization between individual async threads.
Definition: GDBRemoteClientBase.h:140
lldb_private::process_gdb_remote::GDBRemoteClientBase::m_async_count
uint32_t m_async_count
Number of threads interested in sending.
Definition: GDBRemoteClientBase.h:129
lldb_private::process_gdb_remote::GDBRemoteClientBase::OnRunPacketSent
virtual void OnRunPacketSent(bool first)
Definition: GDBRemoteClientBase.cpp:283
StringExtractor::GetStringRef
llvm::StringRef GetStringRef() const
Definition: StringExtractor.h:48
lldb_private::process_gdb_remote::GDBRemoteCommunication::PacketResult
PacketResult
Definition: GDBRemoteCommunication.h:92
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::unlock
void unlock()
Definition: GDBRemoteClientBase.cpp:302
lldb_private::process_gdb_remote::GDBRemoteClientBase::m_mutex
std::mutex m_mutex
Variables handling synchronization between the Continue thread and any other threads wishing to send ...
Definition: GDBRemoteClientBase.h:117
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::process_gdb_remote::GDBRemoteCommunication
Definition: GDBRemoteCommunication.h:82
lldb_private::UnixSignals::GetSignalNumberFromName
int32_t GetSignalNumberFromName(const char *name) const
Definition: UnixSignals.cpp:146
StringExtractor::Empty
bool Empty()
Definition: StringExtractor.h:50
lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::m_async_lock
std::unique_lock< std::recursive_mutex > m_async_lock
Definition: GDBRemoteClientBase.h:81
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::LockResult::Failed
@ Failed
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate
Definition: GDBRemoteClientBase.h:21
lldb::eStateExited
@ eStateExited
Process has exited and can't be examined.
Definition: lldb-enumerations.h:90
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate::HandleAsyncStructuredDataPacket
virtual void HandleAsyncStructuredDataPacket(llvm::StringRef data)=0
Process asynchronously-received structured data.
lldb::eStateStopped
@ eStateStopped
Process or thread is stopped and can be examined.
Definition: lldb-enumerations.h:84
lldb_private::process_gdb_remote::GDBRemoteClientBase::SendPacketAndWaitForResponseNoLock
PacketResult SendPacketAndWaitForResponseNoLock(llvm::StringRef payload, StringExtractorGDBRemote &response)
Definition: GDBRemoteClientBase.cpp:224
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::ContinueLock
ContinueLock(GDBRemoteClientBase &comm)
Definition: GDBRemoteClientBase.cpp:292
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate::HandleAsyncMisc
virtual void HandleAsyncMisc(llvm::StringRef data)=0
LLDBAssert.h
lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::DidInterrupt
bool DidInterrupt() const
Definition: GDBRemoteClientBase.h:78
lldb_private::process_gdb_remote::GDBRemoteClientBase::SendAsyncSignal
bool SendAsyncSignal(int signo, std::chrono::seconds interrupt_timeout)
Definition: GDBRemoteClientBase.cpp:161
UnixSignals.h
lldb_private::process_gdb_remote::GDBRemoteCommunication::PacketResult::ErrorSendFailed
@ ErrorSendFailed
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate::HandleAsyncStdout
virtual void HandleAsyncStdout(llvm::StringRef out)=0
lldb_private::process_gdb_remote::GDBRemoteClientBase::SendPacketAndReceiveResponseWithOutputSupport
PacketResult SendPacketAndReceiveResponseWithOutputSupport(llvm::StringRef payload, StringExtractorGDBRemote &response, std::chrono::seconds interrupt_timeout, llvm::function_ref< void(llvm::StringRef)> output_callback)
Definition: GDBRemoteClientBase.cpp:200
lldb::ConnectionStatus
ConnectionStatus
Connection Status Types.
Definition: lldb-enumerations.h:295
lldb_private::UnixSignals
Definition: UnixSignals.h:22
lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::m_acquired
bool m_acquired
Definition: GDBRemoteClientBase.h:84
StringExtractor::GetChar
char GetChar(char fail_value='\0')
Definition: StringExtractor.cpp:45
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::LockResult
LockResult
Definition: GDBRemoteClientBase.h:147
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
StringExtractor::GetHexU8
uint8_t GetHexU8(uint8_t fail_value=0, bool set_eof_on_fail=true)
Definition: StringExtractor.cpp:76
lldb_private::process_gdb_remote
Definition: GDBRemoteClientBase.h:17
GDBR_LOG_PROCESS
#define GDBR_LOG_PROCESS
Definition: ProcessGDBRemoteLog.h:14
lldb_private::process_gdb_remote::GDBRemoteClientBase::SendContinuePacketAndWaitForResponse
lldb::StateType SendContinuePacketAndWaitForResponse(ContinueDelegate &delegate, const UnixSignals &signals, llvm::StringRef payload, std::chrono::seconds interrupt_timeout, StringExtractorGDBRemote &response)
Definition: GDBRemoteClientBase.cpp:39
lldb_private::process_gdb_remote::GDBRemoteCommunication::PacketResult::Success
@ Success
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::LockResult::Cancelled
@ Cancelled
lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::~Lock
~Lock()
Definition: GDBRemoteClientBase.cpp:382
lldb_private::process_gdb_remote::GDBRemoteClientBase
Definition: GDBRemoteClientBase.h:19
StringExtractor::GetHexByteString
size_t GetHexByteString(std::string &str)
Definition: StringExtractor.cpp:300
lldbassert
#define lldbassert(x)
Definition: LLDBAssert.h:15
lldb_private::Broadcaster::BroadcastEvent
void BroadcastEvent(lldb::EventSP &event_sp)
Broadcast an event which has no associated data.
Definition: Broadcaster.h:262
StringExtractor::Clear
void Clear()
Definition: StringExtractor.h:41
lldb_private::process_gdb_remote::GDBRemoteCommunication::ReadPacket
PacketResult ReadPacket(StringExtractorGDBRemote &response, Timeout< std::micro > timeout, bool sync_on_timeout)
Definition: GDBRemoteCommunication.cpp:225
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate::HandleStopReply
virtual void HandleStopReply()=0
StringExtractorGDBRemote::ValidateResponse
bool ValidateResponse() const
Definition: StringExtractorGDBRemote.cpp:615
lldb_private::process_gdb_remote::GDBRemoteCommunication::ReadPacketWithOutputSupport
PacketResult ReadPacketWithOutputSupport(StringExtractorGDBRemote &response, Timeout< std::micro > timeout, bool sync_on_timeout, llvm::function_ref< void(llvm::StringRef)> output_callback)
Definition: GDBRemoteCommunication.cpp:208
lldb_private::process_gdb_remote::GDBRemoteCommunication::SendPacketNoLock
PacketResult SendPacketNoLock(llvm::StringRef payload)
Definition: GDBRemoteCommunication.cpp:121
ProcessGDBRemoteLog.h
lldb_private::process_gdb_remote::GDBRemoteCommunication::eBroadcastBitRunPacketSent
@ eBroadcastBitRunPacketSent
Definition: GDBRemoteCommunication.h:85
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock
Definition: GDBRemoteClientBase.h:145
lldb_private::process_gdb_remote::ProcessGDBRemoteLog::GetLogIfAllCategoriesSet
static Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: ProcessGDBRemoteLog.h:38
lldb_private::process_gdb_remote::GDBRemoteClientBase::m_interrupt_endpoint
std::chrono::time_point< std::chrono::steady_clock > m_interrupt_endpoint
When was the interrupt packet sent.
Definition: GDBRemoteClientBase.h:126
lldb_private::process_gdb_remote::GDBRemoteClientBase::SendPacketAndWaitForResponse
PacketResult SendPacketAndWaitForResponse(llvm::StringRef payload, StringExtractorGDBRemote &response, std::chrono::seconds interrupt_timeout=std::chrono::seconds(0))
Definition: GDBRemoteClientBase.cpp:182
lldb::eConnectionStatusSuccess
@ eConnectionStatusSuccess
Success.
Definition: lldb-enumerations.h:296
lldb_private::process_gdb_remote::GDBRemoteCommunication::PacketResult::ErrorReplyTimeout
@ ErrorReplyTimeout
lldb_private::process_gdb_remote::GDBRemoteClientBase::m_should_stop
bool m_should_stop
Whether we should resume after a stop.
Definition: GDBRemoteClientBase.h:135
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::SyncWithContinueThread
void SyncWithContinueThread()
Definition: GDBRemoteClientBase.cpp:351
lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock
Definition: GDBRemoteClientBase.h:62
lldb_private::process_gdb_remote::GDBRemoteClientBase::Interrupt
bool Interrupt(std::chrono::seconds interrupt_timeout)
Definition: GDBRemoteClientBase.cpp:173
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::LockResult::Success
@ Success
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::~ContinueLock
~ContinueLock()
Definition: GDBRemoteClientBase.cpp:297
lldb::eStateInvalid
@ eStateInvalid
Definition: lldb-enumerations.h:74
lldb_private::process_gdb_remote::GDBRemoteClientBase::m_continue_packet
std::string m_continue_packet
Packet with which to resume after an async interrupt.
Definition: GDBRemoteClientBase.h:122
lldb_private::process_gdb_remote::GDBRemoteCommunication::GetPacketTimeout
std::chrono::seconds GetPacketTimeout() const
Definition: GDBRemoteCommunication.h:152
StringExtractorGDBRemote
Definition: StringExtractorGDBRemote.h:21
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::lock
LockResult lock()
Definition: GDBRemoteClientBase.cpp:313
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:73
lldb_private::Log
Definition: Log.h:49
lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::Lock
Lock(GDBRemoteClientBase &comm, std::chrono::seconds interrupt_timeout=std::chrono::seconds(0))
Definition: GDBRemoteClientBase.cpp:341
GDBR_LOG_PACKETS
#define GDBR_LOG_PACKETS
Definition: ProcessGDBRemoteLog.h:16
lldb
Definition: SBAddress.h:15
lldb_private::Log::PutCString
void PutCString(const char *cstr)
Definition: Log.cpp:118