[Lldb-commits] [PATCH] D123426: [lldb] Don't report progress in the REPL
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 8 15:35:09 PDT 2022
JDevlieghere created this revision.
JDevlieghere added a reviewer: aprantl.
Herald added a project: All.
JDevlieghere requested review of this revision.
Don't report progress events in the REPL. Most of the progress events
are very debugger specific which are very useful when you're debugging,
but not so much when you're waiting for the next line to be executed.
This patch disables reporting of progress events when in REPL mode.
rdar://91502950
https://reviews.llvm.org/D123426
Files:
lldb/include/lldb/Core/Debugger.h
lldb/source/Core/Debugger.cpp
lldb/source/Expression/REPL.cpp
Index: lldb/source/Expression/REPL.cpp
===================================================================
--- lldb/source/Expression/REPL.cpp
+++ lldb/source/Expression/REPL.cpp
@@ -25,6 +25,7 @@
REPL::REPL(LLVMCastKind kind, Target &target) : m_target(target), m_kind(kind) {
// Make sure all option values have sane defaults
Debugger &debugger = m_target.GetDebugger();
+ debugger.SetShowProgress(false);
auto exe_ctx = debugger.GetCommandInterpreter().GetExecutionContext();
m_format_options.OptionParsingStarting(&exe_ctx);
m_varobj_options.OptionParsingStarting(&exe_ctx);
Index: lldb/source/Core/Debugger.cpp
===================================================================
--- lldb/source/Core/Debugger.cpp
+++ lldb/source/Core/Debugger.cpp
@@ -385,6 +385,12 @@
nullptr, idx, g_debugger_properties[idx].default_uint_value != 0);
}
+bool Debugger::SetShowProgress(bool show_progress) {
+ const uint32_t idx = ePropertyShowProgress;
+ return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx,
+ show_progress);
+}
+
llvm::StringRef Debugger::GetShowProgressAnsiPrefix() const {
const uint32_t idx = ePropertyShowProgressAnsiPrefix;
return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx, "");
Index: lldb/include/lldb/Core/Debugger.h
===================================================================
--- lldb/include/lldb/Core/Debugger.h
+++ lldb/include/lldb/Core/Debugger.h
@@ -301,6 +301,8 @@
bool GetShowProgress() const;
+ bool SetShowProgress(bool show_progress);
+
llvm::StringRef GetShowProgressAnsiPrefix() const;
llvm::StringRef GetShowProgressAnsiSuffix() const;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123426.421648.patch
Type: text/x-patch
Size: 1707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220408/44fc9dca/attachment-0001.bin>
More information about the lldb-commits
mailing list