summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/ThreadMemory.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-12 20:07:46 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-12 20:07:46 +0000
commitb3ae87617437c5850003cd7ab35e0b3581d2b7da (patch)
tree432a368c3ea470e6bb546276e059f19aa3c491dc /lldb/source/Plugins/Process/Utility/ThreadMemory.h
parent7181ed33461e3ee0a3fd4d9f8ec16b708d34ab2f (diff)
downloadbcm5719-llvm-b3ae87617437c5850003cd7ab35e0b3581d2b7da.tar.gz
bcm5719-llvm-b3ae87617437c5850003cd7ab35e0b3581d2b7da.zip
<rdar://problem/13491977>
Made some fixes to the OperatingSystemPython class: - If any thread dictionary contains any "core=N" key/value pairs then the threads obtained from the lldb_private::Process itself will be placed inside the ThreadMemory threads and will be used to get the information for a thread. - Cleaned up all the places where a thread inside a thread was causing problems llvm-svn: 179405
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/ThreadMemory.h')
-rw-r--r--lldb/source/Plugins/Process/Utility/ThreadMemory.h52
1 files changed, 47 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/Utility/ThreadMemory.h b/lldb/source/Plugins/Process/Utility/ThreadMemory.h
index 7ee9758783c..095078676be 100644
--- a/lldb/source/Plugins/Process/Utility/ThreadMemory.h
+++ b/lldb/source/Plugins/Process/Utility/ThreadMemory.h
@@ -33,9 +33,6 @@ public:
//------------------------------------------------------------------
// lldb_private::Thread methods
//------------------------------------------------------------------
- virtual void
- RefreshStateAfterStop();
-
virtual lldb::RegisterContextSP
GetRegisterContext ();
@@ -46,30 +43,75 @@ public:
GetPrivateStopReason ();
virtual const char *
+ GetInfo ()
+ {
+ if (m_backing_thread_sp)
+ m_backing_thread_sp->GetInfo();
+ return NULL;
+ }
+
+ virtual const char *
GetName ()
{
- return m_name.c_str();
+ if (!m_name.empty())
+ return m_name.c_str();
+ if (m_backing_thread_sp)
+ m_backing_thread_sp->GetName();
+ return NULL;
}
virtual const char *
GetQueueName ()
{
- return m_queue.c_str();
+ if (!m_queue.empty())
+ return m_queue.c_str();
+ if (m_backing_thread_sp)
+ m_backing_thread_sp->GetQueueName();
+ return NULL;
}
virtual bool
WillResume (lldb::StateType resume_state);
+ virtual void
+ DidResume ()
+ {
+ if (m_backing_thread_sp)
+ m_backing_thread_sp->DidResume();
+ }
+
+ virtual void
+ RefreshStateAfterStop();
+
lldb::ValueObjectSP &
GetValueObject ()
{
return m_thread_info_valobj_sp;
}
+
+ virtual void
+ ClearBackingThread ()
+ {
+ m_backing_thread_sp.reset();
+ }
+
+ virtual bool
+ SetBackingThread (const lldb::ThreadSP &thread_sp)
+ {
+ m_backing_thread_sp = thread_sp;
+ return (bool)thread_sp;
+ }
protected:
//------------------------------------------------------------------
// For ThreadMemory and subclasses
//------------------------------------------------------------------
+ // If this memory thread is actually represented by a thread from the
+ // lldb_private::Process subclass, then fill in the thread here and
+ // all APIs will be routed through this thread object. If m_backing_thread_sp
+ // is empty, then this thread is simply in memory with no representation
+ // through the process plug-in.
+ lldb::ThreadSP m_backing_thread_sp;
lldb::ValueObjectSP m_thread_info_valobj_sp;
std::string m_name;
std::string m_queue;
OpenPOWER on IntegriCloud