diff options
author | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-03 04:04:48 +0000 |
---|---|---|
committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2019-10-03 04:04:48 +0000 |
commit | 96898eb6a935533aaebbfbd085150fbf705c0ffc (patch) | |
tree | 810c11bdcc946df6b525a243f65b19d9c59ce9d0 /lldb/source/Plugins/ScriptInterpreter/Python | |
parent | 5750453020926ce270aee38bd5eb7f0ff3467237 (diff) | |
download | bcm5719-llvm-96898eb6a935533aaebbfbd085150fbf705c0ffc.tar.gz bcm5719-llvm-96898eb6a935533aaebbfbd085150fbf705c0ffc.zip |
SBDebugger::SetInputFile, SetOutputFile, etc.
Summary:
Add new methods to SBDebugger to set IO files as SBFiles instead of
as FILE* streams.
In future commits, the FILE* methods will be deprecated and these
will become the primary way to set the debugger I/O streams.
Reviewers: JDevlieghere, jasonmolenda, labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68181
llvm-svn: 373563
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp index 20745d42e7a..58431447f4f 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -954,6 +954,8 @@ PythonFile::PythonFile(PyRefType type, PyObject *o) { Reset(type, o); } PythonFile::~PythonFile() {} bool PythonFile::Check(PyObject *py_obj) { + if (!py_obj) + return false; #if PY_MAJOR_VERSION < 3 return PyFile_Check(py_obj); #else |