diff options
author | Greg Clayton <gclayton@apple.com> | 2011-01-12 02:25:42 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-01-12 02:25:42 +0000 |
commit | 722a0cdc954fcc872e24796cd99fd7de2ceff67e (patch) | |
tree | 4aacec89d12523ff207e0b34e1817499bc18daa3 /lldb/source/API/SBThread.cpp | |
parent | 654098f4116f6f6018c1e18a3462c2bb20012559 (diff) | |
download | bcm5719-llvm-722a0cdc954fcc872e24796cd99fd7de2ceff67e.tar.gz bcm5719-llvm-722a0cdc954fcc872e24796cd99fd7de2ceff67e.zip |
Added the following functions to SBThread to allow threads to be suspended when a process is resumed:
bool SBThread::Suspend();
bool SBThread::Resume();
bool SBThread::IsSuspended();
llvm-svn: 123300
Diffstat (limited to 'lldb/source/API/SBThread.cpp')
-rw-r--r-- | lldb/source/API/SBThread.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index 772444de85d..e99a81237ae 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -562,6 +562,36 @@ SBThread::RunToAddress (lldb::addr_t addr) } +bool +SBThread::Suspend() +{ + if (m_opaque_sp) + { + m_opaque_sp->SetResumeState (eStateSuspended); + return true; + } + return false; +} + +bool +SBThread::Resume () +{ + if (m_opaque_sp) + { + m_opaque_sp->SetResumeState (eStateRunning); + return true; + } + return false; +} + +bool +SBThread::IsSuspended() +{ + if (m_opaque_sp) + m_opaque_sp->GetResumeState () == eStateSuspended; + return false; +} + SBProcess SBThread::GetProcess () { |