Package org.eclipse.debug.core.model
Interface IThread
- All Superinterfaces:
IAdaptable
,IDebugElement
,IStep
,ISuspendResume
,ITerminate
A thread is a sequential flow of execution in a debug target.
A thread contains stack frames. Stack frames are only available when the
thread is suspended, and are returned in top-down order.
Minimally, a thread supports the following:
- suspend/resume
- stepping
- terminate
Clients may implement this interface.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the breakpoints that caused this thread to suspend, or an empty collection if this thread is not suspended or was not suspended by a breakpoint.getName()
Returns the name of this thread.int
Returns the priority of this thread.Returns the stack frames contained in this thread.Returns the top stack frame ornull
if there is currently no top stack frame.boolean
Returns whether this thread currently contains any stack frames.Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement
getDebugTarget, getLaunch, getModelIdentifier
Methods inherited from interface org.eclipse.debug.core.model.IStep
canStepInto, canStepOver, canStepReturn, isStepping, stepInto, stepOver, stepReturn
Methods inherited from interface org.eclipse.debug.core.model.ISuspendResume
canResume, canSuspend, isSuspended, resume, suspend
Methods inherited from interface org.eclipse.debug.core.model.ITerminate
canTerminate, isTerminated, terminate
-
Method Details
-
getStackFrames
Returns the stack frames contained in this thread. An empty collection is returned if this thread contains no stack frames, or is not currently suspended. Stack frames are returned in top down order.- Returns:
- a collection of stack frames
- Throws:
DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
- Since:
- 2.0
-
hasStackFrames
Returns whether this thread currently contains any stack frames.- Returns:
- whether this thread currently contains any stack frames
- Throws:
DebugException
- if this method fails. Reasons include:- Failure communicating with the debug target. The DebugException's status code contains the underlying exception responsible for the failure.
- Since:
- 2.0
-
getPriority
Returns the priority of this thread. The meaning of this number is operating-system dependent.- Returns:
- thread priority
- Throws:
DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
-
getTopStackFrame
Returns the top stack frame ornull
if there is currently no top stack frame.- Returns:
- the top stack frame, or
null
if none - Throws:
DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
-
getName
Returns the name of this thread. Name format is debug model specific, and should be specified by a debug model.- Returns:
- this thread's name
- Throws:
DebugException
- if this method fails. Reasons include:- Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
-
getBreakpoints
IBreakpoint[] getBreakpoints()Returns the breakpoints that caused this thread to suspend, or an empty collection if this thread is not suspended or was not suspended by a breakpoint. Usually a single breakpoint will be returned, but this collection can contain more than one breakpoint if two breakpoints are at the same location in a program.- Returns:
- the collection of breakpoints that caused this thread to suspend
-