summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-07-24 01:36:24 +0000
committerJason Molenda <jmolenda@apple.com>2014-07-24 01:36:24 +0000
commit36a216eefc8c1d46bc6704cd355d55abbea33c41 (patch)
tree2b16c8c5227111fbbe53742cb110d0301f5818ea /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parent451f30e89f882e796cbba744fc4f340b7ddbf43f (diff)
downloadbcm5719-llvm-36a216eefc8c1d46bc6704cd355d55abbea33c41.tar.gz
bcm5719-llvm-36a216eefc8c1d46bc6704cd355d55abbea33c41.zip
Increase the gdb-remote packet timeout for the first packet we send
to the remote side (QStartNoAckMode) - it may take a little longer than normal to get a reply. In debugserver, hardcode the priority for several threads so they aren't de-prioritized when a user app is using system resources. Also, set the names of the threads. <rdar://problem/17509866> llvm-svn: 213828
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 9bc0a968d8e..3eb3d9788ec 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -227,8 +227,18 @@ GDBRemoteCommunicationClient::QueryNoAckModeSupported ()
m_send_acks = true;
m_supports_not_sending_acks = eLazyBoolNo;
+ // This is the first real packet that we'll send in a debug session and it may take a little
+ // longer than normal to receive a reply. Wait at least 6 seconds for a reply to this packet.
+
+ const uint32_t minimum_timeout = 6;
+ uint32_t old_timeout = GetPacketTimeoutInMicroSeconds() / lldb_private::TimeValue::MicroSecPerSec;
+ SetPacketTimeout (std::max (old_timeout, minimum_timeout));
+
StringExtractorGDBRemote response;
- if (SendPacketAndWaitForResponse("QStartNoAckMode", response, false) == PacketResult::Success)
+ PacketResult packet_send_result = SendPacketAndWaitForResponse("QStartNoAckMode", response, false);
+ SetPacketTimeout (old_timeout);
+
+ if (packet_send_result == PacketResult::Success)
{
if (response.IsOKResponse())
{
OpenPOWER on IntegriCloud