diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-01-09 08:15:01 -0800 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-01-09 08:15:41 -0800 |
commit | 45c971f7eef18ef2b77a5f64133dbd7bd5939d5f (patch) | |
tree | d9341bb7a69ce9b198a0056cc8d7d7399d0128e5 /lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp | |
parent | 93a1e9c90c96a9130352bf358d7777f0379ebb48 (diff) | |
download | llvm-45c971f7eef18ef2b77a5f64133dbd7bd5939d5f.zip llvm-45c971f7eef18ef2b77a5f64133dbd7bd5939d5f.tar.gz llvm-45c971f7eef18ef2b77a5f64133dbd7bd5939d5f.tar.bz2 |
[lldb/Lua] Make lldb.debugger et al available to Lua
The Python script interpreter makes the current debugger, target,
process, thread and frame available to interactive scripting sessions
through convenience variables. This patch does the same for Lua.
Differential revision: https://reviews.llvm.org/D71801
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp b/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp index dc64139..1dd0a9e 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp @@ -10,9 +10,9 @@ #include "llvm/Support/FormatVariadic.h" using namespace lldb_private; +using namespace lldb; llvm::Error Lua::Run(llvm::StringRef buffer) { - std::lock_guard<std::mutex> lock(m_mutex); int error = luaL_loadbuffer(m_lua_state, buffer.data(), buffer.size(), "buffer") || lua_pcall(m_lua_state, 0, 0, 0); |