================
@@ -51,9 +56,10 @@ void Progress::Increment(uint64_t amount, std::string 
update) {
 void Progress::ReportProgress(std::string update) {
   if (!m_complete) {
     // Make sure we only send one notification that indicates the progress is
-    // complete.
-    m_complete = m_completed == m_total;
-    Debugger::ReportProgress(m_id, m_title, std::move(update), m_completed,
-                             m_total, m_debugger_id);
+    // complete, and only modify m_complete is m_total isn't null.
+    if (m_total.has_value())
+      m_complete = m_completed == m_total.value();
+    Debugger::ReportProgress(m_id, m_title, m_details, m_completed,
+                             m_total.value_or(0), m_debugger_id);
----------------
chelcassanova wrote:

Not sure how I didn't realize that, I had this implementation from my first 
patch for a bool flag for this. Weirdly enough the test passed with those 
changes even though I don't think they should've. Either way I'll update this, 
my mistake.

https://github.com/llvm/llvm-project/pull/77547
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to