[Lldb-commits] [lldb] [lldb/Format] Make progress count show thousands separators (NFC) (PR #137446)

via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 25 21:56:01 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Med Ismail Bennani (medismailben)

<details>
<summary>Changes</summary>

This patch changes the progress count formatting show thousands separator making it easier to read big numbers.

---
Full diff: https://github.com/llvm/llvm-project/pull/137446.diff


1 Files Affected:

- (modified) lldb/source/Core/FormatEntity.cpp (+1-1) 


``````````diff
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index e352d07fe487d..6cdfcfedf8be5 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -1959,7 +1959,7 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
     if (Target *target = Target::GetTargetFromContexts(exe_ctx, sc)) {
       if (auto progress = target->GetDebugger().GetCurrentProgressReport()) {
         if (progress->total != UINT64_MAX) {
-          s.Format("[{0}/{1}]", progress->completed, progress->total);
+          s.Format("[{0:N}/{1:N}]", progress->completed, progress->total);
           return true;
         }
       }

``````````

</details>


https://github.com/llvm/llvm-project/pull/137446


More information about the lldb-commits mailing list