JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land.
LGTM ================ 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, ...)" ---------------- tammela wrote: > JDevlieghere wrote: > > Can we unpack the SBStructuredData and check for `foo` or `123` in the > > output? > While I was doing this change, I noted that the `SBStructuredData` API for > `GetStringValue` is quite odd. > For Lua, the auto-generated SWIG wrapper enforces code like this: > ``` > local result = "xxxx" > sd:GetStringValue(result, 3) -- 'sd' should be a value with at most 3 > characters > ``` > This sort of API leaks all sorts of details to the Lua script. I think it > could be improved to just return a `std::string` / `llvm::StringRef` object. > > The SWIG wrapper also has some bugs for this class. For instance it's using > `lua_pushnumber` where it should be `lua_pushinteger` for the > `GetIntegerValue` method. > > I will report this to the SWIG authors. I still think this is important. Can you add a FIXME so we remember update this in the future? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93649/new/ https://reviews.llvm.org/D93649 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits