diff options
author | Vince Harron <vince@nethacker.com> | 2015-05-12 01:10:56 +0000 |
---|---|---|
committer | Vince Harron <vince@nethacker.com> | 2015-05-12 01:10:56 +0000 |
commit | 8b33567189ea25fbdd454d9c4cc75cb2850a821f (patch) | |
tree | 1f16337a50f4a62cd82d8961ee311390a9a10614 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | 7b6c0e02acd94ece5b3d6674a1c397adf7f9d7b3 (diff) | |
download | llvm-8b33567189ea25fbdd454d9c4cc75cb2850a821f.zip llvm-8b33567189ea25fbdd454d9c4cc75cb2850a821f.tar.gz llvm-8b33567189ea25fbdd454d9c4cc75cb2850a821f.tar.bz2 |
Get lldb-server building on android-9
Build lldb-server with an android-9 sysroot.
llvm-svn: 237078
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 064b60a..89d9876 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -259,7 +259,7 @@ GDBRemoteCommunication::SendPacketNoLock (const char *payload, size_t payload_le strm.Printf("<%4" PRIu64 "> send packet: %.*s", (uint64_t)bytes_written, (int)binary_start_offset, packet_data); const uint8_t *p; // Print binary data exactly as sent - for (p = (uint8_t*)packet_data + binary_start_offset; *p != '#'; ++p) + for (p = (const uint8_t*)packet_data + binary_start_offset; *p != '#'; ++p) strm.Printf("\\x%2.2x", *p); // Print the checksum strm.Printf("%*s", (int)3, p); @@ -822,7 +822,11 @@ GDBRemoteCommunication::StartDebugserverProcess (const char *hostname, // connect to us.. error = StartListenThread ("127.0.0.1", 0); if (error.Fail()) + { + if (log) + log->Printf ("GDBRemoteCommunication::%s() unable to start listen thread: %s", __FUNCTION__, error.AsCString()); return error; + } ConnectionFileDescriptor *connection = (ConnectionFileDescriptor *)GetConnection (); // Wait for 10 seconds to resolve the bound port @@ -839,6 +843,8 @@ GDBRemoteCommunication::StartDebugserverProcess (const char *hostname, else { error.SetErrorString ("failed to bind to port 0 on 127.0.0.1"); + if (log) + log->Printf ("GDBRemoteCommunication::%s() failed: %s", __FUNCTION__, error.AsCString()); return error; } } @@ -957,6 +963,13 @@ GDBRemoteCommunication::StartDebugserverProcess (const char *hostname, { error.SetErrorStringWithFormat ("unable to locate " DEBUGSERVER_BASENAME ); } + + if (error.Fail()) + { + if (log) + log->Printf ("GDBRemoteCommunication::%s() failed: %s", __FUNCTION__, error.AsCString()); + } + return error; } |