Add necessary typemaps for Lua bindings, together with some other files.
Signed-off-by: Siger Yang <sigeryeung@gmail.com>
Paths
| Differential D108090
[lldb/lua] Supplement Lua bindings for lldb module ClosedPublic Authored by siger-young on Aug 15 2021, 9:44 AM.
Details Summary Add necessary typemaps for Lua bindings, together with some other files. Signed-off-by: Siger Yang <sigeryeung@gmail.com>
Diff Detail
Event Timelinesiger-young retitled this revision from [lldb/lua] Supplement typemaps for Lua bindings to [lldb/lua] Supplement Lua bindings for lldb module.Aug 15 2021, 12:59 PM Comment Actions Missing test cases! This revision now requires changes to proceed.Aug 16 2021, 4:50 AM Comment Actions Trying to run the tests in my system failed with the following: FAIL: lldb-api :: lua_api/TestLuaAPI.py (1793 of 2389) ******************** TEST 'lldb-api :: lua_api/TestLuaAPI.py' FAILED ******************** Script: -- /usr/bin/python3.9 /home/pedro/vm/llvm-HEAD/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env ARCHIVER=/usr/bin/ar --env OBJCOPY=/usr/bin/objcopy --env LLVM_LIBS_DIR=/home/pedro/vm/llvm-HEAD/build/./lib --arch x86_64 --build-dir /home/pedro/vm/llvm-HEAD/build/lldb-test-build.noindex --lldb-module-cache-dir /home/pedro/vm/llvm-HEAD/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/pedro/vm/llvm-HEAD/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/pedro/vm/llvm-HEAD/build/./bin/lldb --compiler /home/pedro/vm/llvm-HEAD/build/./bin/clang --dsymutil /home/pedro/vm/llvm-HEAD/build/./bin/dsymutil --llvm-tools-dir /home/pedro/vm/llvm-HEAD/build/./bin --lldb-libs-dir /home/pedro/vm/llvm-HEAD/build/./lib /home/pedro/vm/llvm-HEAD/lldb/test/API/lua_api -p TestLuaAPI.py --env LUA_EXECUTABLE=/usr/bin/lua5.3 -- Exit Code: 1 Command Output (stdout): -- lldb version 14.0.0 (https://github.com/llvm/llvm-project.git revision 3c5616bad32ec20af3d160dee79b6da6d5978857) clang revision 3c5616bad32ec20af3d160dee79b6da6d5978857 llvm revision 3c5616bad32ec20af3d160dee79b6da6d5978857 Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc'] -- Command Output (stderr): -- Traceback (most recent call last): File "/home/pedro/vm/llvm-HEAD/lldb/test/API/dotest.py", line 7, in <module> lldbsuite.test.run_suite() File "/home/pedro/vm/llvm-HEAD/lldb/packages/Python/lldbsuite/test/dotest.py", line 974, in run_suite visit('Test', dirpath, filenames) File "/home/pedro/vm/llvm-HEAD/lldb/packages/Python/lldbsuite/test/dotest.py", line 681, in visit visit_file(dir, name) File "/home/pedro/vm/llvm-HEAD/lldb/packages/Python/lldbsuite/test/dotest.py", line 622, in visit_file module = __import__(base) File "/home/pedro/vm/llvm-HEAD/lldb/test/API/lua_api/TestLuaAPI.py", line 8, in <module> import lit.util ModuleNotFoundError: No module named 'lit' My guess is that you are not using LLVM's lit but instead using the system's
Comment Actions Hi Siger, We are almost there. I have been busy the past weeks, but I will try to review ASAP once you address my comments.
JDevlieghere added inline comments.
This revision now requires changes to proceed.Sep 20 2021, 1:11 PM Comment Actions This update mainly fixed problematic typemaps and adding necessary comments. Together, it forced Lua installation path as "PREFIX/lib/lua/5.3" and removed "lit.util" in tests. Comment Actions Just one last thing and I think we are done! Thanks for your work.
Closed by commit rG67f94e5a9745: [lldb/lua] Supplement Lua bindings for lldb module (authored by Siger Yang <sigeryeung@gmail.com>). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 375240 lldb/CMakeLists.txt
lldb/bindings/lua/CMakeLists.txt
lldb/bindings/lua/lua-typemaps.swig
lldb/bindings/lua/lua-wrapper.swig
lldb/bindings/lua/lua.swig
lldb/source/API/liblldb-private.exports
lldb/source/API/liblldb.exports
lldb/test/API/lit.site.cfg.py.in
lldb/test/API/lldbtest.py
lldb/test/API/lua_api/TestBreakpointAPI.lua
lldb/test/API/lua_api/TestComprehensive.lua
lldb/test/API/lua_api/TestFileHandle.lua
lldb/test/API/lua_api/TestLuaAPI.py
lldb/test/API/lua_api/TestProcessAPI.lua
lldb/test/API/lua_api/lua_lldb_test.lua
lldb/test/API/lua_api/main.c
|
FindLuaAndSwig.cmake is responsible for finding Lua. If LLDB_ENABLE_LUA is set, then you can assume Lua is available.