1 //===-- OperatingSystemPython.h ---------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_DISABLE_PYTHON
11 #ifndef liblldb_OperatingSystemPython_h_
12 #define liblldb_OperatingSystemPython_h_
16 // Other libraries and framework includes
17 #include "lldb/Interpreter/ScriptInterpreter.h"
18 #include "lldb/Target/OperatingSystem.h"
20 class DynamicRegisterInfo;
22 class OperatingSystemPython : public lldb_private::OperatingSystem
25 //------------------------------------------------------------------
27 //------------------------------------------------------------------
28 static lldb_private::OperatingSystem *
29 CreateInstance (lldb_private::Process *process, bool force);
37 static lldb_private::ConstString
38 GetPluginNameStatic();
41 GetPluginDescriptionStatic();
43 //------------------------------------------------------------------
45 //------------------------------------------------------------------
46 OperatingSystemPython (lldb_private::Process *process,
47 const lldb_private::FileSpec &python_module_path);
50 ~OperatingSystemPython ();
52 //------------------------------------------------------------------
53 // lldb_private::PluginInterface Methods
54 //------------------------------------------------------------------
55 virtual lldb_private::ConstString
61 //------------------------------------------------------------------
62 // lldb_private::OperatingSystem Methods
63 //------------------------------------------------------------------
65 UpdateThreadList (lldb_private::ThreadList &old_thread_list,
66 lldb_private::ThreadList &real_thread_list,
67 lldb_private::ThreadList &new_thread_list);
70 ThreadWasSelected (lldb_private::Thread *thread);
72 virtual lldb::RegisterContextSP
73 CreateRegisterContextForThread (lldb_private::Thread *thread,
74 lldb::addr_t reg_data_addr);
76 virtual lldb::StopInfoSP
77 CreateThreadStopReason (lldb_private::Thread *thread);
79 //------------------------------------------------------------------
80 // Method for lazy creation of threads on demand
81 //------------------------------------------------------------------
82 virtual lldb::ThreadSP
83 CreateThread (lldb::tid_t tid, lldb::addr_t context);
89 return m_python_object_sp && m_python_object_sp->GetObject() != NULL;
93 CreateThreadFromThreadInfo (lldb_private::PythonDictionary &thread_dict,
94 lldb_private::ThreadList &core_thread_list,
95 lldb_private::ThreadList &old_thread_list,
96 bool *did_create_ptr);
99 GetDynamicRegisterInfo ();
101 lldb::ValueObjectSP m_thread_list_valobj_sp;
102 std::unique_ptr<DynamicRegisterInfo> m_register_info_ap;
103 lldb_private::ScriptInterpreter *m_interpreter;
104 lldb::ScriptInterpreterObjectSP m_python_object_sp;
108 #endif // #ifndef liblldb_OperatingSystemPython_h_
109 #endif // #ifndef LLDB_DISABLE_PYTHON