[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

2020-06-26 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/include/lldb/Interpreter/ScriptInterpreter.h:57-58 private: + friend std::unique_ptr + std::make_unique(); + labath wrote: > If that works, I suppose it's fine. But I wouldn't be surprised if this trick >

[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

2020-06-25 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd79273c941d5: [lldb/ScriptInterpreter] Extract IO redirection logic (authored by JDevlieghere). Herald added a project: LLDB. Changed prior to commit:

[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

2020-06-25 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. I think this looks good, though it looks like you have uploaded an partial patch... Comment at: lldb/include/lldb/Interpreter/ScriptInterpreter.h:57-58 private: + friend

[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

2020-06-24 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 273068. JDevlieghere added a comment. This now has a small function change w.r.t. the error message. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82396/new/ https://reviews.llvm.org/D82396 Files:

[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

2020-06-24 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere marked an inline comment as done. JDevlieghere added inline comments. Comment at: lldb/source/Interpreter/ScriptInterpreter.cpp:171 + if (!nullin) { +error = nullin.takeError(); +return; labath wrote: > I'm pretty sure this will trigger an

[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

2020-06-24 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Sounds like a good idea, just the error handling needs to be done carefully. Comment at: lldb/source/Interpreter/ScriptInterpreter.cpp:171 + if (!nullin) { +error = nullin.takeError(); +return; I'm pretty sure this will trigger

[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

2020-06-23 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 272825. JDevlieghere added a comment. Consume the error when the result pointer is null. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82396/new/ https://reviews.llvm.org/D82396 Files: lldb/include/lldb/Interpreter/ScriptInterpreter.h

[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

2020-06-23 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: labath, LLDB. This patch takes the IO redirection logic from ScriptInterpreterPython and moves it into the interpreter library so that it can be used by other script interpreters. I've turned it into a RAII object so that we