[Lldb-commits] [lldb] [SBProgress] Add swig support for `with` statement in Python (PR #133527)

Alexandre Perez via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 28 15:38:50 PDT 2025


================
@@ -52,6 +52,13 @@ Non-deterministic progresses behave the same, but omit the total in the construc
     # Explicitly send a progressEnd, otherwise this will be sent
     # when the python runtime cleans up this object.
     non_deterministic_progress.Finalize()
+
+Additionally for Python, progress is supported in a with statement. ::
+    with lldb.SBProgress('Non deterministic progress, 'Detail', lldb.SBDebugger) as progress:
----------------
aperez wrote:

Just a nit, the string in the first argument is not terminated:
```
with lldb.SBProgress('Non deterministic progress', 'Detail', lldb.SBDebugger) as progress:
```

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


More information about the lldb-commits mailing list