[Lldb-commits] [PATCH] D120100: [lldb/bindings] Expose the progress reporting machinery to the SWIG interface
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 22 03:31:22 PST 2022
labath added inline comments.
================
Comment at: lldb/bindings/interface/SBDebugger.i:126-129
+ %apply uint64_t& INOUT { uint64_t& progress_id };
+ %apply uint64_t& INOUT { uint64_t& completed };
+ %apply uint64_t& INOUT { uint64_t& total };
+ %apply bool& INOUT { bool& is_debugger_specific };
----------------
mib wrote:
> labath wrote:
> > mib wrote:
> > > @labath In my understanding, these tell SWIG to return return the reference values as a tuple. They are pre-pending the function return value. I'll write a follow-up patch to test it.
> > Ah, that's cool. So it takes the `in` value as a regular argument, and provides the `out` value in the return value.
> >
> > I don't suppose there's any chance of making this an `out`-only argument, to avoid the dummy input argument ?
> I don't think SWIG offers such thing unfortunately.
What about [[ http://www.swig.org/Doc1.3/Arguments.html#Arguments_nn5 | this ]] ?
> The following typemap rules tell SWIG that pointer is the output value of a function. When used, you do not need to supply the argument when calling the function. <...>
The article speaks about pointer arguments, but in my (simple) test, it seemed to work fine for references as well...
================
Comment at: lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py:42
+
+ @skipUnlessDarwin
+ def test_dwarf_symbol_loading_progress_report(self):
----------------
mib wrote:
> labath wrote:
> > Why?
> So far, I know that Linux and macOS report some basic progress events when reading DWARF, but I'm not sure other platforms do, so I might be able to only skip windows.
The original progress patch (D97739) has a test running on linux, so I'd expect this should work there too. The test in that patch is disabled on windows, but that might be due to some vscode issues. I don't see why there should be any differences between windows and linux in terms of the dwarf events generated -- both of them don't use accelerator tables by default.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120100/new/
https://reviews.llvm.org/D120100
More information about the lldb-commits
mailing list