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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 23 01:01:02 PDT 2020


labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp:64
+
+  if (out) {
+    lua_pushstring(m_lua_state, "stdout");
----------------
JDevlieghere wrote:
> 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. 
Ok, that's fine. But then you should remove the `=nullptr` default arguments.


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

https://reviews.llvm.org/D82273





More information about the lldb-commits mailing list