summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-02-18 19:52:51 +0000
committeremaste <emaste@FreeBSD.org>2014-02-18 19:52:51 +0000
commitf5e6858941423ebbd5f369ae041fdd8ae1ff404d (patch)
tree4b7112f641e225f50ba2fb8b4053a0f56c45662f /contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
parentdc56a06bc6654ce03ea11356a755fbdcae2b7608 (diff)
parent6beac4fcf9e5327f07c0fefd527180124438096a (diff)
downloadFreeBSD-src-f5e6858941423ebbd5f369ae041fdd8ae1ff404d.zip
FreeBSD-src-f5e6858941423ebbd5f369ae041fdd8ae1ff404d.tar.gz
Update LLDB snapshot to upstream r201577
Highlights include: - Improvements to the remote GDB protocol client (r196610, r197579, r197857, r200072) - Bug fixes for big-endian targets (r196808) - Initial support for libdispatch (GCD) queues in the debuggee (r197190) - Add "step-avoid-libraries" setting (r199943) - IO subsystem improvements (including initial work on a curses gui) (r200263) - Various bug fixes for memory leaks, LLDB segfaults, the C++ demangler, ELF core files, DWARF debug info, and others. Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h')
-rw-r--r--contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h43
1 files changed, 35 insertions, 8 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h b/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
index a107795..d836111 100644
--- a/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
+++ b/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
@@ -35,6 +35,19 @@ public:
{
eBroadcastBitRunPacketSent = kLoUserBroadcastBit
};
+
+ enum class PacketResult
+ {
+ Success = 0, // Success
+ ErrorSendFailed, // Error sending the packet
+ ErrorSendAck, // Didn't get an ack back after sending a packet
+ ErrorReplyFailed, // Error getting the reply
+ ErrorReplyTimeout, // Timed out waiting for reply
+ ErrorReplyInvalid, // Got a reply but it wasn't valid for the packet that was sent
+ ErrorReplyAck, // Sending reply ack failed
+ ErrorDisconnected, // We were disconnected
+ ErrorNoSequenceLock // We couldn't get the sequence lock for a multi-packet request
+ };
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
@@ -45,7 +58,7 @@ public:
virtual
~GDBRemoteCommunication();
- char
+ PacketResult
GetAck ();
size_t
@@ -109,9 +122,10 @@ public:
// supplied connection URL.
//------------------------------------------------------------------
lldb_private::Error
- StartDebugserverProcess (const char *connect_url,
- const char *unix_socket_name,
- lldb_private::ProcessLaunchInfo &launch_info);
+ StartDebugserverProcess (const char *hostname,
+ uint16_t in_port, // If set to zero, then out_port will contain the bound port on exit
+ lldb_private::ProcessLaunchInfo &launch_info,
+ uint16_t &out_port);
void
DumpHistory(lldb_private::Stream &strm);
@@ -223,15 +237,15 @@ protected:
mutable bool m_dumped_to_log;
};
- size_t
+ PacketResult
SendPacket (const char *payload,
size_t payload_length);
- size_t
+ PacketResult
SendPacketNoLock (const char *payload,
size_t payload_length);
- size_t
+ PacketResult
WaitForPacketWithTimeoutMicroSecondsNoLock (StringExtractorGDBRemote &response,
uint32_t timeout_usec);
@@ -242,7 +256,7 @@ protected:
// Classes that inherit from GDBRemoteCommunication can see and modify these
//------------------------------------------------------------------
uint32_t m_packet_timeout;
-#ifdef LLDB_CONFIGURATION_DEBUG
+#ifdef ENABLE_MUTEX_ERROR_CHECKING
lldb_private::TrackingMutex m_sequence_mutex;
#else
lldb_private::Mutex m_sequence_mutex; // Restrict access to sending/receiving packets to a single thread at a time
@@ -256,9 +270,22 @@ protected:
// a single process
+ lldb_private::Error
+ StartListenThread (const char *hostname = "localhost",
+ uint16_t port = 0);
+
+ bool
+ JoinListenThread ();
+ static lldb::thread_result_t
+ ListenThread (lldb::thread_arg_t arg);
private:
+
+ lldb::thread_t m_listen_thread;
+ std::string m_listen_url;
+
+
//------------------------------------------------------------------
// For GDBRemoteCommunication only
//------------------------------------------------------------------
OpenPOWER on IntegriCloud