[Lldb-commits] [PATCH] D18057: Fixed an issue where python would always use stdin, stdout and stderr
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 10 11:37:50 PST 2016
clayborg created this revision.
clayborg added a reviewer: zturner.
clayborg added a subscriber: lldb-commits.
After the Python 3 fixes the interactive python interpreter stopped working in Xcode. The issue was the python interpreter tried to adopt the top IOHandler file handles, but it failed due to lldb_private::File objects failing to copy themselves into another lldb_private::File because they contained "FILE *" file stream pointer, not just an integer file descriptor, and File::Duplicate() didn't handle duplicating "FILE *". But we really don't want files duplicating themselves each time we run a python expression, we just want to use the files.
The fix involves removing File::Duplicate() since we shouldn't be using this and duplicating files. It also removes File's assignment operator and copy constructor. It then fixes the python interpreter to correctly adopt the file handles from the top IOHandler.
http://reviews.llvm.org/D18057
Files:
include/lldb/Host/File.h
source/Host/common/File.cpp
source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18057.50320.patch
Type: text/x-patch
Size: 6803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160310/948c5d26/attachment.bin>
More information about the lldb-commits
mailing list