diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-06-23 09:04:52 -0700 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-06-23 09:05:51 -0700 |
| commit | fa1b4a96a0110c87cdd83eb4ea3e9a0d002c3c3d (patch) | |
| tree | 2732d4ee1d06f0e0f4d3752cb4a26d35a2679e0a /lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp | |
| parent | 45fa936855f62dc7864028a3f2fa7a9693b9fceb (diff) | |
[lldb/Lua] Use the debugger's output and error file for Lua's I/O library.
Add support for changing the stdout and stderr file in Lua's I/O library
and hook it up with the debugger's output and error file respectively
for the interactive Lua interpreter.
https://reviews.llvm.org/D82273
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp')
| -rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp index f8fd8ff94aa3..30a50e1c9888 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp @@ -30,6 +30,9 @@ public: ">>> ", "..> ", true, debugger.GetUseColor(), 0, *this, nullptr), m_script_interpreter(script_interpreter) { + llvm::cantFail(m_script_interpreter.GetLua().ChangeIO( + debugger.GetOutputFile().GetStream(), + debugger.GetErrorFile().GetStream())); llvm::cantFail(m_script_interpreter.EnterSession(debugger.GetID())); } |
