diff options
author | Greg Clayton <gclayton@apple.com> | 2013-05-01 21:54:04 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-05-01 21:54:04 +0000 |
commit | 160c9d81e07fec2d6299a9f31bb004f1b97419a6 (patch) | |
tree | 01aef16f7f4a45a2eb3c37b5083eda3c8e9cc429 /lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp | |
parent | 5ed5181178f256f99954f2662547658a49335088 (diff) | |
download | bcm5719-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/MacOSX-Kernel/ThreadKDP.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp index a8b1b08bcdb..6f0116e7f44 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp @@ -66,23 +66,6 @@ ThreadKDP::GetQueueName () return NULL; } -bool -ThreadKDP::WillResume (StateType resume_state) -{ - // Call the Thread::WillResume first. If we stop at a signal, the stop info - // class for signal will set the resume signal that we need below. The signal - // stuff obeys the Process::UnixSignal defaults. - Thread::WillResume(resume_state); - - ClearStackFrames(); - - Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP)); - if (log) - log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state)); - - return true; -} - void ThreadKDP::RefreshStateAfterStop() { @@ -100,16 +83,6 @@ ThreadKDP::RefreshStateAfterStop() reg_ctx_sp->InvalidateIfNeeded (force); } -void -ThreadKDP::ClearStackFrames () -{ - Unwind *unwinder = GetUnwinder (); - if (unwinder) - unwinder->Clear(); - Thread::ClearStackFrames(); -} - - bool ThreadKDP::ThreadIDIsValid (lldb::tid_t thread) { |