Add necessary typemaps for Lua bindings, together with some other files.
Signed-off-by: Siger Yang <sigeryeung@gmail.com>
Differential D108090
[lldb/lua] Supplement Lua bindings for lldb module siger-young on Aug 15 2021, 9:44 AM. Authored by
Details Add necessary typemaps for Lua bindings, together with some other files. Signed-off-by: Siger Yang <sigeryeung@gmail.com>
Diff Detail
Event TimelineComment Actions Missing test cases! 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.
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.
|
FindLuaAndSwig.cmake is responsible for finding Lua. If LLDB_ENABLE_LUA is set, then you can assume Lua is available.