diff options
author | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-16 01:58:15 +0000 |
---|---|---|
committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-16 01:58:15 +0000 |
commit | b07823f3e2da9b1c6f1866bf1725cfff5eea5b48 (patch) | |
tree | 95250eceb57a07459348d7d6f3e4aa4231c7b6c7 /lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py | |
parent | 9d10b9d99b4d93114eb5d879878fcbb70f2d5b75 (diff) | |
download | bcm5719-llvm-b07823f3e2da9b1c6f1866bf1725cfff5eea5b48.tar.gz bcm5719-llvm-b07823f3e2da9b1c6f1866bf1725cfff5eea5b48.zip |
update ScriptInterpreterPython to use File, not FILE*
Summary:
ScriptInterpreterPython needs to save and restore sys.stdout and
friends when LLDB runs a python script.
It currently does this using FILE*, which is not optimal. If
whatever was in sys.stdout can not be represented as a FILE*, then
it will not be restored correctly when the script is finished.
It also means that if the debugger's own output stream is not
representable as a file, ScriptInterpreterPython will not be able
to redirect python's output correctly.
This patch updates ScriptInterpreterPython to represent files with
lldb_private::File, and to represent whatever the user had in
sys.stdout as simply a PythonObject.
This will make lldb interoperate better with other scripts or programs
that need to manipulate sys.stdout.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68962
llvm-svn: 374964
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py')
0 files changed, 0 insertions, 0 deletions