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
>
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:
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
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:
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
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
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
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