[Lldb-commits] [PATCH] D93649: [lldb/Lua] add support for Lua function breakpoint
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 5 10:04:34 PST 2021
JDevlieghere added inline comments.
================
Comment at: lldb/bindings/lua/lua-wrapper.swig:25-29
+ auto extra_args = [&]() -> llvm::Optional<lldb::SBStructuredData> {
+ if (extra_args_impl == nullptr)
+ return {};
+ return lldb::SBStructuredData(extra_args_impl);
+ } ();
----------------
I don't think you need the lambda. I used `unique_ptr` but `llvm:Optional` would work as well.
================
Comment at: lldb/test/Shell/ScriptInterpreter/Lua/breakpoint_function_callback.test:15
+r
+# CHECK: <userdata of type 'lldb::SBStructuredData *' at {{0x[[:xdigit:]]+}}>
+breakpoint command add -s lua -o "abc(frame, bp_loc, ...)"
----------------
Can we unpack the SBStructuredData and check for `foo` or `123` in the output?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93649/new/
https://reviews.llvm.org/D93649
More information about the lldb-commits
mailing list