Skip to content

Commit cbcb3bc

Browse files
committed
[lldb] Don't report progress in the REPL
Don't report progress events in the REPL. Most of the progress events are debugger specific which are useful when you're debugging, but not so much when you're waiting for the next line to be executed in the REPL. This patch disables reporting of progress events when in REPL mode. rdar://91502950 Differential revision: https://reviews.llvm.org/D123426
1 parent d06fb90 commit cbcb3bc

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

lldb/include/lldb/Core/Debugger.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
301301

302302
bool GetShowProgress() const;
303303

304+
bool SetShowProgress(bool show_progress);
305+
304306
llvm::StringRef GetShowProgressAnsiPrefix() const;
305307

306308
llvm::StringRef GetShowProgressAnsiSuffix() const;

lldb/source/Core/Debugger.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,12 @@ bool Debugger::GetShowProgress() const {
385385
nullptr, idx, g_debugger_properties[idx].default_uint_value != 0);
386386
}
387387

388+
bool Debugger::SetShowProgress(bool show_progress) {
389+
const uint32_t idx = ePropertyShowProgress;
390+
return m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx,
391+
show_progress);
392+
}
393+
388394
llvm::StringRef Debugger::GetShowProgressAnsiPrefix() const {
389395
const uint32_t idx = ePropertyShowProgressAnsiPrefix;
390396
return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx, "");

lldb/source/Expression/REPL.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ using namespace lldb_private;
2525
REPL::REPL(LLVMCastKind kind, Target &target) : m_target(target), m_kind(kind) {
2626
// Make sure all option values have sane defaults
2727
Debugger &debugger = m_target.GetDebugger();
28+
debugger.SetShowProgress(false);
2829
auto exe_ctx = debugger.GetCommandInterpreter().GetExecutionContext();
2930
m_format_options.OptionParsingStarting(&exe_ctx);
3031
m_varobj_options.OptionParsingStarting(&exe_ctx);

0 commit comments

Comments
 (0)