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
This commit is contained in:
Lawrence D'Anna
2019-10-03 04:01:07 +00:00
parent f13b8d4fe9
commit 5750453020
16 changed files with 428 additions and 25 deletions

View File

@@ -466,8 +466,6 @@ public:
void Reset(PyRefType type, PyObject *py_obj) override;
void Reset(File &file, const char *mode);
static uint32_t GetOptionsFromMode(llvm::StringRef mode);
lldb::FileUP GetUnderlyingFile() const;
};