summaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Lua/LuaTests.cpp
AgeCommit message (Collapse)Author
2023-05-15[lldb] Fix lua build after 27b6a4e63afeAlex Langford
This applies the same trick for Lua that I did for python in 27b6a4e63afe. Differential Revision: https://reviews.llvm.org/D150624
2021-12-13[lldb] Clarify StructuredDataImpl ownershipPavel Labath
StructuredDataImpl ownership semantics is unclear at best. Various structures were holding a non-owning pointer to it, with a comment that the object is owned somewhere else. From what I was able to gather that "somewhere else" was the SBStructuredData object, but I am not sure that all created object eventually made its way there. (It wouldn't matter even if they did, as we are leaking most of our SBStructuredData objects.) Since StructuredDataImpl is just a collection of two (shared) pointers, there's really no point in elaborate lifetime management, so this patch replaces all StructuredDataImpl pointers with actual objects or unique_ptrs to it. This makes it much easier to resolve SBStructuredData leaks in a follow-up patch. Differential Revision: https://reviews.llvm.org/D114791
2021-12-06[lldb] Remove extern "C" from lldb-swig-lua interfacePavel Labath
This is the lua equivalent of 9a14adeae0.
2021-07-07[lldb/lua] Add scripted watchpoints for LuaSiger Yang
Add support for Lua scripted watchpoints, with basic tests. Differential Revision: https://reviews.llvm.org/D105034
2021-01-25[lldb/Lua] add support for Lua function breakpointPedro Tammela
Adds support for running a Lua function when a breakpoint is hit. Example: breakpoint command add -s lua -F abc The above runs the Lua function 'abc' passing 2 arguments. 'frame', 'bp_loc' and 'extra_args'. A third parameter 'extra_args' is only present when there is structured data declared in the command line. Example: breakpoint command add -s lua -F abc -k foo -v bar Differential Revision: https://reviews.llvm.org/D93649
2020-11-30[LLDB/Lua] add support for one-liner breakpoint callbackPedro Tammela
These callbacks are set using the following: breakpoint command add -s lua -o "print('hello world!')" The user supplied script is executed as: function (frame, bp_loc, ...) <body> end So the local variables 'frame', 'bp_loc' and vararg are all accessible. Any global variables declared will persist in the Lua interpreter. A user should never hold 'frame' and 'bp_loc' in a global variable as these userdatas are context dependent. Differential Revision: https://reviews.llvm.org/D91508
2019-12-21[Lldb/Lua] Generate Lua BindingsJonas Devlieghere
This patch uses SWIG to generate the Lua bindings for the SB API. It covers most of the API, but some methods require a type map similar to Python. Discussion on the mailing list: http://lists.llvm.org/pipermail/lldb-dev/2019-December/015812.html Differential revision: https://reviews.llvm.org/D71235
2019-12-20[lldb/Lua] Implement a Simple Lua Script Interpreter PrototypeJonas Devlieghere
This implements a very elementary Lua script interpreter. It supports running a single command as well as running interactively. It uses editline if available. It's still missing a bunch of stuff though. Some things that I intentionally ingored for now are that I/O isn't properly hooked up (so every print goes to stdout) and the non-editline support which is not handling a bunch of corner cases. The latter is a matter of reusing existing code in the Python interpreter. Discussion on the mailing list: http://lists.llvm.org/pipermail/lldb-dev/2019-December/015812.html Differential revision: https://reviews.llvm.org/D71234