summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
index 7d95d576945..34549d97f3d 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
@@ -19,6 +19,7 @@
#include "lldb/Core/ConstString.h"
#include "lldb/Core/StructuredData.h"
#include "lldb/Core/Flags.h"
+#include "lldb/Host/File.h"
#include "lldb/Interpreter/OptionValue.h"
namespace lldb_private {
@@ -67,7 +68,8 @@ enum class PyObjectType
Integer,
Dictionary,
List,
- String
+ String,
+ File
};
enum class PyRefType
@@ -197,6 +199,9 @@ public:
}
bool
+ HasAttribute(llvm::StringRef attribute) const;
+
+ bool
IsValid() const;
bool
@@ -315,6 +320,21 @@ public:
StructuredData::DictionarySP CreateStructuredDictionary() const;
};
+class PythonFile : public PythonObject
+{
+ public:
+ explicit PythonFile(File &file, const char *mode);
+ PythonFile(PyRefType type, PyObject *o);
+ ~PythonFile() override;
+
+ static bool Check(PyObject *py_obj);
+
+ using PythonObject::Reset;
+
+ void Reset(PyRefType type, PyObject *py_obj) override;
+ void Reset(File &file, const char *mode);
+};
+
} // namespace lldb_private
#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H
OpenPOWER on IntegriCloud