teak-llvm/lldb/packages/Python/lldbsuite/test/python_api
Lawrence D'Anna b07823f3e2 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
2019-10-16 01:58:15 +00:00
..
breakpoint [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
class_members [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
debugger [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
default-constructor remove FILE* bindings from SBInstruction. 2019-10-14 20:59:57 +00:00
disassemble-raw-data Fix TestDisassemble_VST1_64 2019-10-15 07:20:01 +00:00
event [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
exprpath_synthetic [lldb] [test] Mark failing tests XFAIL on NetBSD 2019-03-04 16:54:06 +00:00
file_handle update ScriptInterpreterPython to use File, not FILE* 2019-10-16 01:58:15 +00:00
findvalue_duplist Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
formatters Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
frame Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
function_symbol [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
hello_world TestHelloWorld: Make compatible with remote testing 2019-10-09 21:41:02 +00:00
interpreter Fix test breakage caused by r374424 2019-10-14 18:53:27 +00:00
lldbutil Revert: [lldb] [testsuite] Remove redundant MAKE_DSYM := NO 2019-09-27 18:52:34 +00:00
module_section Revert: [lldb] [testsuite] Remove redundant MAKE_DSYM := NO 2019-09-27 18:52:34 +00:00
name_lookup [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
objc_type Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
process Ah, only skip this for embedded darwin targets. 2019-09-11 01:03:24 +00:00
rdar-12481949 [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
sbdata [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
sblaunchinfo Add Utility/Environment class for handling... environments 2018-01-10 11:57:31 +00:00
sbstructureddata [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
sbtype_typeclass [lldb] [test] Mark failing tests XFAIL on NetBSD 2019-03-04 16:54:06 +00:00
sbvalue_const_addrof [ScriptInterpreter] Limit LLDB's globals to interactive mode. 2019-09-18 00:30:01 +00:00
sbvalue_persist [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
section [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
signals [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
symbol-context [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
target [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
thread [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
type [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
value [Python] Implement __next__ for value_iter 2019-09-04 18:59:13 +00:00
value_var_update Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
watchpoint [Windows] Add support of watchpoints to ProcessWindows 2019-09-06 05:37:03 +00:00
.categories