[Lldb-commits] [PATCH] D157764: [LLDB] Allow expression evaluators to set arbitrary timeouts
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 11 15:32:12 PDT 2023
wallace created this revision.
wallace added a reviewer: bulbazord.
Herald added a project: All.
wallace requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D157764
Files:
lldb/include/lldb/Target/Target.h
Index: lldb/include/lldb/Target/Target.h
===================================================================
--- lldb/include/lldb/Target/Target.h
+++ lldb/include/lldb/Target/Target.h
@@ -346,16 +346,9 @@
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157764.549538.patch
Type: text/x-patch
Size: 798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230811/a483a8f8/attachment-0001.bin>
More information about the lldb-commits
mailing list