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
This commit is contained in:
Greg Clayton
2011-01-12 02:25:42 +00:00
parent 654098f411
commit 722a0cdc95
5 changed files with 84 additions and 29 deletions

View File

@@ -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 ()
{