aboutsummaryrefslogtreecommitdiff
path: root/source/Host/posix/ConnectionFileDescriptorPosix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Host/posix/ConnectionFileDescriptorPosix.cpp')
-rw-r--r--source/Host/posix/ConnectionFileDescriptorPosix.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/source/Host/posix/ConnectionFileDescriptorPosix.cpp
index 64101fdc4267..a3ac36558e32 100644
--- a/source/Host/posix/ConnectionFileDescriptorPosix.cpp
+++ b/source/Host/posix/ConnectionFileDescriptorPosix.cpp
@@ -19,7 +19,6 @@
#include "lldb/Host/IOObject.h"
#include "lldb/Host/Socket.h"
#include "lldb/Host/SocketAddress.h"
-#include "lldb/Host/StringConvert.h"
#include "lldb/Utility/SelectHelper.h"
// C Includes
@@ -43,13 +42,12 @@
#endif
// Project includes
#include "lldb/Core/Communication.h"
-#include "lldb/Core/Log.h"
-#include "lldb/Core/StreamString.h"
#include "lldb/Core/Timer.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/Socket.h"
#include "lldb/Host/common/TCPSocket.h"
-#include "lldb/Interpreter/Args.h"
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/StreamString.h"
using namespace lldb;
using namespace lldb_private;
@@ -561,10 +559,7 @@ ConnectionFileDescriptor::BytesAvailable(const Timeout<std::micro> &timeout,
// ever get used more generally we will need to lock here as well.
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_CONNECTION));
- if (log)
- log->Printf(
- "%p ConnectionFileDescriptor::BytesAvailable (timeout_usec = %lu)",
- static_cast<void *>(this), long(timeout ? timeout->count() : -1));
+ LLDB_LOG(log, "this = {0}, timeout = {1}", this, timeout);
// Make a copy of the file descriptors to make sure we don't
// have another thread change these values out from under us
@@ -753,14 +748,12 @@ ConnectionStatus ConnectionFileDescriptor::ConnectTCP(llvm::StringRef s,
ConnectionStatus ConnectionFileDescriptor::ConnectUDP(llvm::StringRef s,
Error *error_ptr) {
- Socket *send_socket = nullptr;
- Socket *recv_socket = nullptr;
- Error error = Socket::UdpConnect(s, m_child_processes_inherit, send_socket,
- recv_socket);
+ Socket *socket = nullptr;
+ Error error = Socket::UdpConnect(s, m_child_processes_inherit, socket);
if (error_ptr)
*error_ptr = error;
- m_write_sp.reset(send_socket);
- m_read_sp.reset(recv_socket);
+ m_write_sp.reset(socket);
+ m_read_sp = m_write_sp;
if (error.Fail()) {
return eConnectionStatusError;
}