[Lldb-commits] [PATCH] D128768: [lldb/Core] Fix finite progress event reporting

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 5 14:16:15 PDT 2022


mib updated this revision to Diff 442397.
mib marked an inline comment as done.
mib added a comment.

Address @JDevlieghere comment


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,9 +1835,20 @@
   // 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()) {
+      StreamString log_stream;
+      log_stream.AsRawOstream()
+          << static_cast<void *>(this) << " Debugger(" << GetID()
+          << ")::HandleProgressEvent( m_current_event_id = "
+          << *m_current_event_id << ", data = { ";
+      data->Dump(&log_stream);
+      log_stream << " } )";
+      log->PutString(log_stream.GetString());
+    }
     if (id != *m_current_event_id)
       return;
-    if (data->GetCompleted())
+    if (data->GetCompleted() == data->GetTotal())
       m_current_event_id.reset();
   } else {
     m_current_event_id = id;
@@ -1860,7 +1871,7 @@
   // Print over previous line, if any.
   output->Printf("\r");
 
-  if (data->GetCompleted()) {
+  if (data->GetCompleted() == data->GetTotal()) {
     // Clear the current line.
     output->Printf("\x1B[2K");
     output->Flush();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128768.442397.patch
Type: text/x-patch
Size: 1203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220705/658ed64c/attachment.bin>


More information about the lldb-commits mailing list