diff options
author | Greg Clayton <gclayton@apple.com> | 2013-10-25 18:13:17 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-10-25 18:13:17 +0000 |
commit | 9ac6d2db7368a9ad55111c39605c1aefa220390e (patch) | |
tree | acbb777bb75cc37841c17cf75f938a1a31596216 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | d334b1a326a94489cbe2c37ac7adb4457437ad66 (diff) | |
download | bcm5719-llvm-9ac6d2db7368a9ad55111c39605c1aefa220390e.tar.gz bcm5719-llvm-9ac6d2db7368a9ad55111c39605c1aefa220390e.zip |
<rdar://problem/15263540>
Added a new key that we understand for the "qHostInfo" packet: "default_packet_timeout:T;" where T is a default packet timeout in seconds.
This allows GDB servers with known slow packet response times to increase the default timeout to a value that makes sense for the connection.
llvm-svn: 193425
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index f551babc051..aff9c7bc977 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -138,6 +138,14 @@ namespace { const uint32_t idx = ePropertyPacketTimeout; return m_collection_sp->GetPropertyAtIndexAsUInt64(NULL, idx, g_properties[idx].default_uint_value); } + + bool + SetPacketTimeout(uint64_t timeout) + { + const uint32_t idx = ePropertyPacketTimeout; + return m_collection_sp->SetPropertyAtIndexAsUInt64(NULL, idx, timeout); + } + FileSpec GetTargetDefinitionFile () const { @@ -536,6 +544,16 @@ ProcessGDBRemote::BuildDynamicRegisterInfo (bool force) } } + // Check if qHostInfo specified a specific packet timeout for this connection. + // If so then lets update our setting so the user knows what the timeout is + // and can see it. + const uint32_t host_packet_timeout = m_gdb_comm.GetHostDefaultPacketTimeout(); + if (host_packet_timeout) + { + GetGlobalPluginProperties()->SetPacketTimeout(host_packet_timeout); + } + + if (reg_num == 0) { FileSpec target_definition_fspec = GetGlobalPluginProperties()->GetTargetDefinitionFile (); |