diff options
| author | Greg Clayton <gclayton@apple.com> | 2011-06-17 03:31:01 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2011-06-17 03:31:01 +0000 |
| commit | f3dd93c888afa9dcdbd7da6d6e09c879ce6b2cb2 (patch) | |
| tree | f76a511e402175dfec524f1f6bacd9daccb64f25 /lldb/source/Plugins/Process/gdb-remote | |
| parent | b0f5372bb33dac2aa487e9f4041e32910550344e (diff) | |
| download | bcm5719-llvm-f3dd93c888afa9dcdbd7da6d6e09c879ce6b2cb2.tar.gz bcm5719-llvm-f3dd93c888afa9dcdbd7da6d6e09c879ce6b2cb2.zip | |
Added the notion of an system root for SDKs. This is a directory where all
libraries and headers exist. This can be specified using the platform select
function:
platform select --sysroot /Volumes/remote-root remote-macosx
Each platform subclass is free to interpret the sysroot as needed.
Expose the new SDK root directory through the SBDebugger class.
Fixed an issue with the GDB remote protocol where unimplemented packets were
not being handled correctly.
llvm-svn: 133231
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index c2c9ddf3bfb..12c912da02f 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -38,7 +38,7 @@ GDBRemoteCommunication::GDBRemoteCommunication(const char *comm_name, const char *listener_name, bool is_platform) : Communication(comm_name), - m_packet_timeout (60), + m_packet_timeout (1), m_sequence_mutex (Mutex::eMutexTypeRecursive), m_public_is_running (false), m_private_is_running (false), @@ -246,6 +246,7 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri size_t content_length = 0; size_t total_length = 0; size_t checksum_idx = std::string::npos; + LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS)); switch (m_bytes[0]) { @@ -281,16 +282,20 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri break; default: + { + if (log) + log->Printf ("GDBRemoteCommunication::%s tossing junk byte at %c",__FUNCTION__, m_bytes[0]); + m_bytes.erase(0, 1); + } break; } - LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS)); if (content_length == std::string::npos) { packet.Clear(); return false; } - else if (content_length > 0) + else if (total_length > 0) { // We have a valid packet... @@ -345,12 +350,6 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri packet.SetFilePos(0); return success; } - else - { - if (log) - log->Printf ("GDBRemoteCommunication::%s tossing junk byte at %c",__FUNCTION__, m_bytes[0]); - m_bytes.erase(0, 1); - } } packet.Clear(); return false; |

