summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2016-03-10 20:49:32 +0000
committerGreg Clayton <gclayton@apple.com>2016-03-10 20:49:32 +0000
commita31baf081b9bbe51ad411249dbdc67abbcedad41 (patch)
treea7d1df36dc2a7cb23d425c43327059b7369638ab /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
parentad04914a53bc21c2f1678ecc5ab0c5617b668ad0 (diff)
downloadbcm5719-llvm-a31baf081b9bbe51ad411249dbdc67abbcedad41.tar.gz
bcm5719-llvm-a31baf081b9bbe51ad411249dbdc67abbcedad41.zip
Fixed the python interpreter so that it correctly inherits the top IOHandler's files instead of always using stdin/out/err.
Removed lldb_private::File::Duplicate() and the copy constructor and the assignment operator that used to duplicate the file handles and made them private so no one uses them. Previously the lldb_private::File::Duplicate() function duplicated files that used file descriptors, (int) but not file streams (FILE *), so the lldb_private::File::Duplicate() function only worked some of the time. No one else excep thee ScriptInterpreterPython was using these functions, so that aren't needed nor desired. Previously every time you would drop into the python interpreter we would duplicate files, and now we avoid this file churn. <rdar://problem/24877720> llvm-svn: 263161
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
index 4c6eb394989..83702a02554 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
@@ -581,6 +581,9 @@ protected:
bool
GetEmbeddedInterpreterModuleObjects ();
+ bool
+ SetStdHandle(File &file, const char *py_name, PythonFile &save_file, const char *mode);
+
PythonFile m_saved_stdin;
PythonFile m_saved_stdout;
PythonFile m_saved_stderr;
OpenPOWER on IntegriCloud