mib updated this revision to Diff 441110.
mib added a comment.
Log only when verbose mode is enabled
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128768/new/
https://reviews.llvm.org/D128768
Files:
lldb/source/Core/Debugger.cpp
Index: lldb/source/Core/Debugger.cpp
===================================================================
--- lldb/source/Core/Debugger.cpp
+++ lldb/source/Core/Debugger.cpp
@@ -1835,10 +1835,26 @@
// going to show the progress.
const uint64_t id = data->GetID();
if (m_current_event_id) {
+ Log *log = GetLog(LLDBLog::Events);
+ if (log && log->GetVerbose()) {
+ if (data->IsFinite())
+ LLDB_LOGF(log,
+ "%p Debugger('%llu')::HandleProgressEvent "
+ "(m_current_event_id = {%llu}, data = {id = %llu, message = "
+ "%s, completed = %llu, total = %llu})",
+ static_cast<void *>(this), m_uid, *m_current_event_id, id,
+ data->GetMessage().data(), data->GetCompleted(),
+ data->GetTotal());
+ else
+ LLDB_LOGF(
+ log,
+ "%p Debugger('%llu')::HandleProgressEvent (m_current_event_id = "
+ "{%llu}, data = {id = %llu, message = %s, infinite = true})",
+ static_cast<void *>(this), m_uid, *m_current_event_id, id,
+ data->GetMessage().data());
+ }
if (id != *m_current_event_id)
return;
- if (data->GetCompleted())
- m_current_event_id.reset();
} else {
m_current_event_id = id;
}
@@ -1860,8 +1876,9 @@
// Print over previous line, if any.
output->Printf("\r");
- if (data->GetCompleted()) {
+ if (data->GetCompleted() == data->GetTotal()) {
// Clear the current line.
+ m_current_event_id.reset();
output->Printf("\x1B[2K");
output->Flush();
return;
Index: lldb/source/Core/Debugger.cpp
===================================================================
--- lldb/source/Core/Debugger.cpp
+++ lldb/source/Core/Debugger.cpp
@@ -1835,10 +1835,26 @@
// going to show the progress.
const uint64_t id = data->GetID();
if (m_current_event_id) {
+ Log *log = GetLog(LLDBLog::Events);
+ if (log && log->GetVerbose()) {
+ if (data->IsFinite())
+ LLDB_LOGF(log,
+ "%p Debugger('%llu')::HandleProgressEvent "
+ "(m_current_event_id = {%llu}, data = {id = %llu, message = "
+ "%s, completed = %llu, total = %llu})",
+ static_cast<void *>(this), m_uid, *m_current_event_id, id,
+ data->GetMessage().data(), data->GetCompleted(),
+ data->GetTotal());
+ else
+ LLDB_LOGF(
+ log,
+ "%p Debugger('%llu')::HandleProgressEvent (m_current_event_id = "
+ "{%llu}, data = {id = %llu, message = %s, infinite = true})",
+ static_cast<void *>(this), m_uid, *m_current_event_id, id,
+ data->GetMessage().data());
+ }
if (id != *m_current_event_id)
return;
- if (data->GetCompleted())
- m_current_event_id.reset();
} else {
m_current_event_id = id;
}
@@ -1860,8 +1876,9 @@
// Print over previous line, if any.
output->Printf("\r");
- if (data->GetCompleted()) {
+ if (data->GetCompleted() == data->GetTotal()) {
// Clear the current line.
+ m_current_event_id.reset();
output->Printf("\x1B[2K");
output->Flush();
return;
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits