Allow operating system plug-ins to specify the address for registers so we don't have to create data up front.
llvm-svn: 166701
diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
index cd3bd8c..6afa01d 100644
--- a/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
+++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.cpp
@@ -18,8 +18,8 @@
using namespace lldb_private;
ThreadMemory::ThreadMemory (Process &process,
- tid_t tid,
- const ValueObjectSP &thread_info_valobj_sp) :
+ tid_t tid,
+ const ValueObjectSP &thread_info_valobj_sp) :
Thread (process, tid),
m_thread_info_valobj_sp (thread_info_valobj_sp),
m_name(),
@@ -31,11 +31,13 @@
ThreadMemory::ThreadMemory (Process &process,
lldb::tid_t tid,
const char *name,
- const char *queue) :
+ const char *queue,
+ lldb::addr_t register_data_addr) :
Thread (process, tid),
m_thread_info_valobj_sp (),
m_name(),
- m_queue()
+ m_queue(),
+ m_register_data_addr (register_data_addr)
{
if (name)
m_name = name;
@@ -70,7 +72,7 @@
{
OperatingSystem *os = process_sp->GetOperatingSystem ();
if (os)
- m_reg_context_sp = os->CreateRegisterContextForThread (this);
+ m_reg_context_sp = os->CreateRegisterContextForThread (this, m_register_data_addr);
}
}
return m_reg_context_sp;