[Lldb-commits] [PATCH] D82273: [lldb/Lua] Use the debugger's output and error file for Lua's I/O library.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 22 18:17:35 PDT 2020


JDevlieghere marked 4 inline comments as done.
JDevlieghere added inline comments.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp:64
+
+  if (out) {
+    lua_pushstring(m_lua_state, "stdout");
----------------
labath wrote:
> What should be the behavior if this is null? Can it even be null (should we be asserting that it isn't)?
> It's not clear to me that we should be reusing the previously set stdout if these arguments are null... Maybe we should be saving the original stdout value and restoring it when we are done? That's what the python interpreter seems to be doing..
I don't really see a benefit to storing it, I'm fine with just asserting that the file is not null. 


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

https://reviews.llvm.org/D82273





More information about the lldb-commits mailing list