diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-12-08 15:32:57 -0800 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-12-21 11:28:41 -0800 |
| commit | bf03e17c570171c7a52117fe63ace89d58f328d5 (patch) | |
| tree | 8361b20a3a9569ef8cf70fed5033e24c414e99c7 /lldb/source/Plugins/ScriptInterpreter | |
| parent | 2203089a60d826e882e2ccfc5cc5d361b4f91078 (diff) | |
| download | bcm5719-llvm-bf03e17c570171c7a52117fe63ace89d58f328d5.tar.gz bcm5719-llvm-bf03e17c570171c7a52117fe63ace89d58f328d5.zip | |
[Lldb/Lua] Generate Lua Bindings
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
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter')
| -rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt b/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt index 498bd978395..f5c62ee3a54 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt +++ b/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt @@ -1,3 +1,5 @@ +find_package(Lua REQUIRED) + add_lldb_library(lldbPluginScriptInterpreterLua PLUGIN Lua.cpp ScriptInterpreterLua.cpp diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h b/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h index 50b7ade4dc4..073e7e22e7d 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h +++ b/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h @@ -16,11 +16,16 @@ namespace lldb_private { +extern "C" { +int luaopen_lldb(lua_State *L); +} + class Lua { public: Lua() : m_lua_state(luaL_newstate()) { assert(m_lua_state); luaL_openlibs(m_lua_state); + luaopen_lldb(m_lua_state); } ~Lua() { |

