[lldb] (Semi-automatically) format .swig filesI've found my recent ventures into the swig land painful becauseof the strange way they are formatted. This patch attempts to alleviatefuture headach
[lldb] (Semi-automatically) format .swig filesI've found my recent ventures into the swig land painful becauseof the strange way they are formatted. This patch attempts to alleviatefuture headaches by formatting these files into something resembling thenormal llvm style.Unfortunately, completely formatting these files automatically does notwork because clang format gets confused by swigs % syntax, so I haveemployed a hybrid approach where I formatted blocks of c++ code withclang-format and then manually massaged the code until it lookedreasonable (and compiled).I don't expect these files to remain perfectly formatted (although, ifone's editor is configured to configure the current line/block onrequest, one can get pretty good results by using it judiciously), butat least it will prevent the (mangled form of the) old lldb style beingproliferated endlessly.Differential Revision: https://reviews.llvm.org/D115736
show more ...
[lldb] Clarify StructuredDataImpl ownershipStructuredDataImpl ownership semantics is unclear at best. Variousstructures were holding a non-owning pointer to it, with a comment thatthe object is o
[lldb] Clarify StructuredDataImpl ownershipStructuredDataImpl ownership semantics is unclear at best. Variousstructures were holding a non-owning pointer to it, with a comment thatthe object is owned somewhere else. From what I was able to gather that"somewhere else" was the SBStructuredData object, but I am not sure thatall created object eventually made its way there. (It wouldn't mattereven if they did, as we are leaking most of our SBStructuredDataobjects.)Since StructuredDataImpl is just a collection of two (shared) pointers,there's really no point in elaborate lifetime management, so this patchreplaces all StructuredDataImpl pointers with actual objects orunique_ptrs to it. This makes it much easier to resolve SBStructuredDataleaks in a follow-up patch.Differential Revision: https://reviews.llvm.org/D114791
[lldb] Remove extern "C" from lldb-swig-lua interfaceThis is the lua equivalent of 9a14adeae0.
[lldb/lua] Supplement Lua bindings for lldb moduleAdd necessary typemaps for Lua bindings, together with some other files.Signed-off-by: Siger Yang <[email protected]>Reviewed By: tammelaD
[lldb/lua] Supplement Lua bindings for lldb moduleAdd necessary typemaps for Lua bindings, together with some other files.Signed-off-by: Siger Yang <[email protected]>Reviewed By: tammelaDifferential Revision: https://reviews.llvm.org/D108090
[lldb/lua] Add scripted watchpoints for LuaAdd support for Lua scripted watchpoints, with basic tests.Differential Revision: https://reviews.llvm.org/D105034
[lldb/Lua] add support for Lua function breakpointAdds support for running a Lua function when a breakpoint is hit.Example: breakpoint command add -s lua -F abcThe above runs the Lua functio
[lldb/Lua] add support for Lua function breakpointAdds support for running a Lua function when a breakpoint is hit.Example: breakpoint command add -s lua -F abcThe 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 datadeclared in the command line.Example: breakpoint command add -s lua -F abc -k foo -v barDifferential Revision: https://reviews.llvm.org/D93649
[lldb/Lua] add 'Lua' before naming versionsNFC
[lldb/Lua] add initial Lua typemapsThis patch adds the integer handling typemaps and the typemap forstring returning functions.The integer handling typemaps overrides SWIG's own typemaps to dist
[lldb/Lua] add initial Lua typemapsThis patch adds the integer handling typemaps and the typemap forstring returning functions.The integer handling typemaps overrides SWIG's own typemaps to distinctthe handling of integers from floating point.The typemap for string returning functions is a port of Python'stypemap.Differential Revision: https://reviews.llvm.org/D94937
[LLDB/Lua] add support for one-liner breakpoint callbackThese callbacks are set using the following: breakpoint command add -s lua -o "print('hello world!')"The user supplied script is execute
[LLDB/Lua] add support for one-liner breakpoint callbackThese 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> endSo 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 asthese userdatas are context dependent.Differential Revision: https://reviews.llvm.org/D91508
[lldb] Fix relative imports and set the appropriate include dirsAfter moving python.swig and lua.swig into their respectivesubdirectories, the relative paths in these files were out of date. This
[lldb] Fix relative imports and set the appropriate include dirsAfter moving python.swig and lua.swig into their respectivesubdirectories, the relative paths in these files were out of date. Thisfixes that and ensures the appropriate include paths are set in the SWIGinvocation.Differential revision: https://reviews.llvm.org/D85859
[lldb/CMake] Separate CMake code for Lua and Python (NFC)Separate the CMake logic for Lua and Python to clearly distinguishbetween code specific to either scripting language and the code sharedby
[lldb/CMake] Separate CMake code for Lua and Python (NFC)Separate the CMake logic for Lua and Python to clearly distinguishbetween code specific to either scripting language and the code sharedby both.What this patch does is: - Move Python specific code into the bindings/python subdirectory. - Move the Lua specific code into the bindings/lua subdirectory. - Add the _python suffix to Python specific functions/targets. - Fix a dependency issue that would check the binding instead of whether the scripting language is enabled.Note that this patch also changes where the bindings are generated,which might affect downstream projects that check them in.Differential revision: https://reviews.llvm.org/D85708
[lldb/Lua] Add lua typemaps for INOUT params