[Lldb-commits] [lldb] r354256 - Return better error message from GDBRemoteCommunication::ConnectLocally
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 18 02:36:23 PST 2019
Author: labath
Date: Mon Feb 18 02:36:23 2019
New Revision: 354256
URL: http://llvm.org/viewvc/llvm-project?rev=354256&view=rev
Log:
Return better error message from GDBRemoteCommunication::ConnectLocally
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=354256&r1=354255&r2=354256&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Mon Feb 18 02:36:23 2019
@@ -1287,9 +1287,10 @@ GDBRemoteCommunication::ConnectLocally(G
std::unique_ptr<ConnectionFileDescriptor> conn_up(
new ConnectionFileDescriptor());
- if (conn_up->Connect(remote_addr, nullptr) != lldb::eConnectionStatusSuccess)
- return llvm::make_error<llvm::StringError>("Unable to connect",
- llvm::inconvertibleErrorCode());
+ Status status;
+ if (conn_up->Connect(remote_addr, &status) != lldb::eConnectionStatusSuccess)
+ return llvm::createStringError(llvm::inconvertibleErrorCode(),
+ "Unable to connect: %s", status.AsCString());
client.SetConnection(conn_up.release());
if (llvm::Error error = accept_status.get().ToError())
More information about the lldb-commits
mailing list