forked from OSchip/llvm-project
Adding new Python API function to check for stopped threads.
llvm-svn: 179577
This commit is contained in:
parent
2d37e5a5a5
commit
a75418dbd6
|
@ -151,6 +151,9 @@ public:
|
|||
bool
|
||||
IsSuspended();
|
||||
|
||||
bool
|
||||
IsStopped();
|
||||
|
||||
uint32_t
|
||||
GetNumFrames ();
|
||||
|
||||
|
|
|
@ -178,6 +178,9 @@ public:
|
|||
bool
|
||||
IsSuspended();
|
||||
|
||||
bool
|
||||
IsStopped();
|
||||
|
||||
uint32_t
|
||||
GetNumFrames ();
|
||||
|
||||
|
@ -258,6 +261,9 @@ public:
|
|||
|
||||
__swig_getmethods__["is_suspended"] = IsSuspended
|
||||
if _newclass: is_suspended = property(IsSuspended, None, doc='''A read only property that returns a boolean value that indicates if this thread is suspended.''')
|
||||
|
||||
__swig_getmethods__["is_stopped"] = IsStopped
|
||||
if _newclass: is_stopped = property(IsStopped, None, doc='''A read only property that returns a boolean value that indicates if this thread is stopped but not exited.''')
|
||||
%}
|
||||
|
||||
};
|
||||
|
|
|
@ -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 ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue