Fixed the python interpreter so that it correctly inherits the top IOHandler's files...
authorGreg Clayton <gclayton@apple.com>
Thu, 10 Mar 2016 20:49:32 +0000 (20:49 +0000)
committerGreg Clayton <gclayton@apple.com>
Thu, 10 Mar 2016 20:49:32 +0000 (20:49 +0000)
commita31baf081b9bbe51ad411249dbdc67abbcedad41
treea7d1df36dc2a7cb23d425c43327059b7369638ab
parentad04914a53bc21c2f1678ecc5ab0c5617b668ad0
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
lldb/include/lldb/Host/File.h
lldb/source/Host/common/File.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h