Adding new Python API function to check for stopped threads.

llvm-svn: 179577
This commit is contained in:
Andrew Kaylor
2013-04-15 23:33:53 +00:00
parent 2d37e5a5a5
commit a75418dbd6
3 changed files with 19 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
#include "lldb/API/SBStream.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/State.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Interpreter/CommandInterpreter.h"
@@ -991,6 +992,15 @@ SBThread::IsSuspended()
return false;
}
bool
SBThread::IsStopped()
{
ExecutionContext exe_ctx (m_opaque_sp.get());
if (exe_ctx.HasThreadScope())
return StateIsStoppedState(exe_ctx.GetThreadPtr()->GetState(), true);
return false;
}
SBProcess
SBThread::GetProcess ()
{