[Lldb-commits] [lldb] a4dbdf4 - [LLDB] Allow expression evaluators to set arbitrary timeouts
walter erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 22 09:27:16 PDT 2023
Author: walter erquinigo
Date: 2023-08-22T12:27:08-04:00
New Revision: a4dbdf4749938396dbf913478289fa426d8341ae
URL: https://github.com/llvm/llvm-project/commit/a4dbdf4749938396dbf913478289fa426d8341ae
DIFF: https://github.com/llvm/llvm-project/commit/a4dbdf4749938396dbf913478289fa426d8341ae.diff
LOG: [LLDB] Allow expression evaluators to set arbitrary timeouts
https://github.com/llvm/llvm-project/commit/59237bb52c9483fce395428bfab5996eabe54ed0 changed the behavior of the `SetTimeout` and `GetTimeout` methods of `EvaluateExpressionOptions`, which broke the Mojo REPL and related services (https://docs.modular.com/mojo/) because it relies on having infinite timeouts. That's a necessity because developers often use the REPL for executing extremely long-running numeric jobs. Having said that, `EvaluateExpressionOptions` shouldn't be that opinionated on this matter anyway. Instead, it should be the responsibility of the evaluator to define which timeout to use for each specific case.
Differential Revision: https://reviews.llvm.org/D157764
Added:
Modified:
lldb/include/lldb/Target/Target.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h
index f86bd3cb4ee55d..ed0ecbbddbf814 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -346,16 +346,9 @@ class EvaluateExpressionOptions {
m_use_dynamic = dynamic;
}
- const Timeout<std::micro> &GetTimeout() const {
- assert(m_timeout && m_timeout->count() > 0);
- return m_timeout;
- }
+ const Timeout<std::micro> &GetTimeout() const { return m_timeout; }
- void SetTimeout(const Timeout<std::micro> &timeout) {
- // Disallow setting a non-zero timeout.
- if (timeout && timeout->count() > 0)
- m_timeout = timeout;
- }
+ void SetTimeout(const Timeout<std::micro> &timeout) { m_timeout = timeout; }
const Timeout<std::micro> &GetOneThreadTimeout() const {
return m_one_thread_timeout;
More information about the lldb-commits
mailing list