The OS plug-in can now get data from a python script that implements the protocol.
llvm-svn: 162540
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp
index 03610a2..9f8e2b5 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextMemory.cpp
@@ -61,7 +61,8 @@
void
RegisterContextMemory::InvalidateAllRegisters ()
{
- SetAllRegisterValid (false);
+ if (m_reg_data_addr != LLDB_INVALID_ADDRESS)
+ SetAllRegisterValid (false);
}
void
@@ -164,3 +165,10 @@
}
return false;
}
+
+void
+RegisterContextMemory::SetAllRegisterData (const lldb::DataBufferSP &data_sp)
+{
+ m_reg_data.SetData(data_sp);
+ SetAllRegisterValid (true);
+}
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMemory.h b/lldb/source/Plugins/Process/Utility/RegisterContextMemory.h
index 6914e3f..5dd7462 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextMemory.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextMemory.h
@@ -80,6 +80,8 @@
virtual bool
WriteAllRegisterValues (const lldb::DataBufferSP &data_sp);
+ void
+ SetAllRegisterData (const lldb::DataBufferSP &data_sp);
protected:
void
diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
index dfcc2b0..10c3a90 100644
--- a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
+++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
@@ -21,11 +21,29 @@
tid_t tid,
const ValueObjectSP &thread_info_valobj_sp) :
Thread (process_sp, tid),
- m_thread_info_valobj_sp (thread_info_valobj_sp)
+ m_thread_info_valobj_sp (thread_info_valobj_sp),
+ m_name(),
+ m_queue()
{
}
+ThreadMemory::ThreadMemory (const lldb::ProcessSP &process_sp,
+ lldb::tid_t tid,
+ const char *name,
+ const char *queue) :
+ Thread (process_sp, tid),
+ m_thread_info_valobj_sp (),
+ m_name(),
+ m_queue()
+{
+ if (name)
+ m_name = name;
+ if (queue)
+ m_queue = queue;
+}
+
+
ThreadMemory::~ThreadMemory()
{
DestroyThread();
diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.h b/lldb/source/Plugins/Process/Utility/ThreadMemory.h
index 96b40a0..c1603d4 100644
--- a/lldb/source/Plugins/Process/Utility/ThreadMemory.h
+++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.h
@@ -21,7 +21,12 @@
lldb::tid_t tid,
const lldb::ValueObjectSP &thread_info_valobj_sp);
- virtual
+ ThreadMemory (const lldb::ProcessSP &process_sp,
+ lldb::tid_t tid,
+ const char *name,
+ const char *queue);
+
+ virtual
~ThreadMemory();
//------------------------------------------------------------------
@@ -39,6 +44,18 @@
virtual lldb::StopInfoSP
GetPrivateStopReason ();
+ virtual const char *
+ GetName ()
+ {
+ return m_name.c_str();
+ }
+
+ virtual const char *
+ GetQueueName ()
+ {
+ return m_queue.c_str();
+ }
+
virtual bool
WillResume (lldb::StateType resume_state);
@@ -53,7 +70,8 @@
// For ThreadMemory and subclasses
//------------------------------------------------------------------
lldb::ValueObjectSP m_thread_info_valobj_sp;
-
+ std::string m_name;
+ std::string m_queue;
private:
//------------------------------------------------------------------
// For ThreadMemory only