summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-05-01 21:54:04 +0000
committerGreg Clayton <gclayton@apple.com>2013-05-01 21:54:04 +0000
commit160c9d81e07fec2d6299a9f31bb004f1b97419a6 (patch)
tree01aef16f7f4a45a2eb3c37b5083eda3c8e9cc429 /lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
parent5ed5181178f256f99954f2662547658a49335088 (diff)
downloadbcm5719-llvm-160c9d81e07fec2d6299a9f31bb004f1b97419a6.tar.gz
bcm5719-llvm-160c9d81e07fec2d6299a9f31bb004f1b97419a6.zip
<rdar://problem/13700260>
<rdar://problem/13723772> Modified the lldb_private::Thread to work much better with the OperatingSystem plug-ins. Operating system plug-ins can now return have a "core" key/value pair in each thread dictionary for the OperatingSystemPython plug-ins which allows the core threads to be contained with memory threads. It also allows these memory threads to be stepped, resumed, and controlled just as if they were the actual backing threads themselves. A few things are introduced: - lldb_private::Thread now has a GetProtocolID() method which returns the thread protocol ID for a given thread. The protocol ID (Thread::GetProtocolID()) is usually the same as the thread id (Thread::GetID()), but it can differ when a memory thread has its own id, but is backed by an actual API thread. - Cleaned up the Thread::WillResume() code to do the mandatory parts in Thread::ShouldResume(), and let the thread subclasses override the Thread::WillResume() which is now just a notification. - Cleaned up ClearStackFrames() implementations so that fewer thread subclasses needed to override them - Changed the POSIXThread class a bit since it overrode Thread::WillResume(). It is doing the wrong thing by calling "Thread::SetResumeState()" on its own, this shouldn't be done by thread subclasses, but the current code might rely on it so I left it in with a TODO comment with an explanation. llvm-svn: 180886
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX/POSIXThread.cpp')
-rw-r--r--lldb/source/Plugins/Process/POSIX/POSIXThread.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
index 3b2ae03bd71..9210408fdad 100644
--- a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
+++ b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp
@@ -150,19 +150,12 @@ POSIXThread::GetUnwinder()
return m_unwinder_ap.get();
}
-bool
+void
POSIXThread::WillResume(lldb::StateType resume_state)
{
+ // TODO: the line below shouldn't really be done, but
+ // the POSIXThread might rely on this so I will leave this in for now
SetResumeState(resume_state);
-
- if (!Thread::WillResume(resume_state))
- return false;
-
- if (m_unwinder_ap.get())
- m_unwinder_ap->Clear();
- Thread::ClearStackFrames();
-
- return true;
}
bool
OpenPOWER on IntegriCloud