new api class: SBFile
authorLawrence D'Anna <lawrence_danna@apple.com>
Thu, 3 Oct 2019 04:01:07 +0000 (04:01 +0000)
committerLawrence D'Anna <lawrence_danna@apple.com>
Thu, 3 Oct 2019 04:01:07 +0000 (04:01 +0000)
commit5750453020926ce270aee38bd5eb7f0ff3467237
tree5e00ea3b2f67bdd77c02d67e409ed27e72fb52d9
parentf13b8d4fe962216cd0e1a7dc318709caa1c5b59a
new api class: SBFile

Summary:
SBFile is a scripting API wrapper for lldb_private::File

This is the first step in a project to enable arbitrary python
io.IOBase file objects -- including those that override the read()
and write() methods -- to be used as the main debugger IOStreams.

Currently this is impossible because python file objects must first
be converted into FILE* streams by SWIG in order to be passed into
the debugger.

full prototype: https://github.com/smoofra/llvm-project/tree/files

Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath

Reviewed By: labath

Subscribers: labath, mgorny, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D67793

llvm-svn: 373562
16 files changed:
lldb/include/lldb/API/LLDB.h
lldb/include/lldb/API/SBDefines.h
lldb/include/lldb/API/SBError.h
lldb/include/lldb/API/SBFile.h [new file with mode: 0644]
lldb/include/lldb/Host/File.h
lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
lldb/scripts/Python/python-typemaps.swig
lldb/scripts/interface/SBFile.i [new file with mode: 0644]
lldb/scripts/lldb.swig
lldb/source/API/CMakeLists.txt
lldb/source/API/SBFile.cpp [new file with mode: 0644]
lldb/source/API/SBReproducer.cpp
lldb/source/Host/common/File.cpp
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h