aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2021-03-02 15:43:11 +0100
committerPavel Labath <pavel@labath.sk>2021-03-04 14:46:02 +0100
commitbf3ac994c4d526b74044a977176e8e07d83f2049 (patch)
treea873a8aa324bdb8bf8991a1760fcce0a0299c814 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parenta756f12b4dc94a2bcd8cd5e57ed7d64f9b3d4670 (diff)
downloadllvm-bf3ac994c4d526b74044a977176e8e07d83f2049.zip
llvm-bf3ac994c4d526b74044a977176e8e07d83f2049.tar.gz
llvm-bf3ac994c4d526b74044a977176e8e07d83f2049.tar.bz2
[lldb] Apply gdb-remote timeout to platform connections as well
We have a plugin.process.gdb-remote.packet-timeout setting, which can be used to control how long the lldb client is willing to wait before declaring the server side dead. Our test suite makes use of this feature, and sets the setting value fairly high, as the low default value can cause flaky tests, particularly on slower bots. After fixing TestPlatformConnect (one of the few tests exercising the remote platform capabilities of lldb) in 4b284b9ca, it immediately started being flaky on the arm bots. It turns out this is because the packet-timeout setting is not being applied to platform connections. This patch makes the platform connections also respect the value of this setting. It also adds a test which checks that the timeout value is being honored. Differential Revision: https://reviews.llvm.org/D97769
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index a2e41e7..4a8eb07 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -213,6 +213,10 @@ ProcessGDBRemote::CreateInstance(lldb::TargetSP target_sp,
return process_sp;
}
+std::chrono::seconds ProcessGDBRemote::GetPacketTimeout() {
+ return std::chrono::seconds(GetGlobalPluginProperties()->GetPacketTimeout());
+}
+
bool ProcessGDBRemote::CanDebug(lldb::TargetSP target_sp,
bool plugin_specified_by_name) {
if (plugin_specified_by_name)