summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-03-17 20:04:04 +0000
committerZachary Turner <zturner@google.com>2015-03-17 20:04:04 +0000
commit0641ca1a2dc2d4923ee702651aab2a9704d563b5 (patch)
tree702d70f8895c939cf047fbd1d31f9909faa4d85a /lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
parentc888dd0cb8b6cc3f1f33674189aea59d0938f2b4 (diff)
downloadbcm5719-llvm-0641ca1a2dc2d4923ee702651aab2a9704d563b5.tar.gz
bcm5719-llvm-0641ca1a2dc2d4923ee702651aab2a9704d563b5.zip
Remove ScriptInterpreterObject.
This removes ScriptInterpreterObject from the codebase completely. Places that used to rely on ScriptInterpreterObject now use StructuredData::Object and its derived classes. To support this, a new type of StructuredData object is introduced, called StructuredData::Generic, which stores a void*. Internally within the python library, StructuredPythonObject subclasses this StructuredData::Generic class so that it can addref and decref the python object on construction and destruction. Additionally, all of the classes in PythonDataObjects.h such as PythonList, PythonDictionary, etc now provide a method to create an instance of the corresponding StructuredData type. For example, there is PythonDictionary::CreateStructuredDictionary. To eliminate dependencies on PythonDataObjects for external callers, all ScriptInterpreter methods now return only StructuredData classes The rest of the changes in this CL are focused on fixing up users of PythonDataObjects classes to use the new StructuredData classes. llvm-svn: 232534
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h')
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
index 3b7dd264dc6..e29bf8054f6 100644
--- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
+++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
@@ -14,11 +14,16 @@
// C Includes
// C++ Includes
// Other libraries and framework includes
-#include "lldb/Interpreter/ScriptInterpreter.h"
+#include "lldb/Core/StructuredData.h"
#include "lldb/Target/OperatingSystem.h"
class DynamicRegisterInfo;
+namespace lldb_private
+{
+class ScriptInterpreter;
+}
+
class OperatingSystemPython : public lldb_private::OperatingSystem
{
public:
@@ -86,15 +91,12 @@ protected:
bool IsValid() const
{
- return m_python_object_sp && m_python_object_sp->GetObject() != NULL;
+ return m_python_object_sp && m_python_object_sp->IsValid();
}
-
- lldb::ThreadSP
- CreateThreadFromThreadInfo (lldb_private::PythonDictionary &thread_dict,
- lldb_private::ThreadList &core_thread_list,
- lldb_private::ThreadList &old_thread_list,
- std::vector<bool> &core_used_map,
- bool *did_create_ptr);
+
+ lldb::ThreadSP CreateThreadFromThreadInfo(lldb_private::StructuredData::Dictionary &thread_dict,
+ lldb_private::ThreadList &core_thread_list, lldb_private::ThreadList &old_thread_list,
+ std::vector<bool> &core_used_map, bool *did_create_ptr);
DynamicRegisterInfo *
GetDynamicRegisterInfo ();
@@ -102,8 +104,7 @@ protected:
lldb::ValueObjectSP m_thread_list_valobj_sp;
std::unique_ptr<DynamicRegisterInfo> m_register_info_ap;
lldb_private::ScriptInterpreter *m_interpreter;
- lldb::ScriptInterpreterObjectSP m_python_object_sp;
-
+ lldb_private::StructuredData::ObjectSP m_python_object_sp;
};
#endif // #ifndef liblldb_OperatingSystemPython_h_
OpenPOWER on IntegriCloud