[Lldb-commits] [PATCH] D71825: [lldb/Lua] Support loading Lua modules.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 10 04:10:19 PST 2020


labath added inline comments.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp:46
+  int error = luaL_loadfile(m_lua_state, filename.data()) ||
+              lua_pcall(m_lua_state, 0, LUA_MULTRET, 0);
+  if (error) {
----------------
It would be better to put `1` here instead `LUA_MULTRET`, to ensure we don't end up with an unbalanced stack if the module happens to return more than one value...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71825/new/

https://reviews.llvm.org/D71825





More information about the lldb-commits mailing list