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
This commit is contained in:
Lawrence D'Anna
2019-10-03 04:04:48 +00:00
parent 5750453020
commit 96898eb6a9
9 changed files with 275 additions and 35 deletions

View File

@@ -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