llunak created this revision. llunak added a reviewer: clayborg. llunak added a project: LLDB. Herald added a subscriber: JDevlieghere. Herald added a project: All. llunak requested review of this revision. Herald added a subscriber: lldb-commits.
Valgrind makes everything run much slower, so don't time out too soon. BTW, does it make sense to get even things like this reviewed, or is it ok if I push these directly if I'm reasonably certain I know what I'm doing? I feel like I'm spamming you by now. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D123020 Files: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -34,6 +34,7 @@ #include "lldb/Utility/StreamString.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/Valgrind.h" #include "ProcessGDBRemoteLog.h" @@ -1244,6 +1245,8 @@ GDBRemoteCommunication::ScopedTimeout::ScopedTimeout( GDBRemoteCommunication &gdb_comm, std::chrono::seconds timeout) : m_gdb_comm(gdb_comm), m_timeout_modified(false) { + if (llvm::sys::RunningOnValgrind()) + timeout *= 100; // Valgrind makes things take much longer. auto curr_timeout = gdb_comm.GetPacketTimeout(); // Only update the timeout if the timeout is greater than the current // timeout. If the current timeout is larger, then just use that.
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -34,6 +34,7 @@ #include "lldb/Utility/StreamString.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/Valgrind.h" #include "ProcessGDBRemoteLog.h" @@ -1244,6 +1245,8 @@ GDBRemoteCommunication::ScopedTimeout::ScopedTimeout( GDBRemoteCommunication &gdb_comm, std::chrono::seconds timeout) : m_gdb_comm(gdb_comm), m_timeout_modified(false) { + if (llvm::sys::RunningOnValgrind()) + timeout *= 100; // Valgrind makes things take much longer. auto curr_timeout = gdb_comm.GetPacketTimeout(); // Only update the timeout if the timeout is greater than the current // timeout. If the current timeout is larger, then just use that.
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits