Class DebugState
- java.lang.Object
-
- com.tonic.analysis.execution.debug.DebugState
-
public final class DebugState extends Object
Immutable snapshot of an interpreter's position, call stack and frame contents at one moment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDebugState.BuilderMutable accumulator for the fields of aDebugState.static classDebugState.StatusLifecycle state of the interpreted run.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCallDepth()List<StackFrameInfo>getCallStack()intgetCurrentLine()StringgetCurrentMethod()intgetCurrentPC()BreakpointgetHitBreakpoint()longgetInstructionCount()LocalsSnapshotgetLocals()StackSnapshotgetOperandStack()DebugState.StatusgetStatus()booleanisAtBreakpoint()booleanisFinished()booleanisPaused()booleanisRunning()StringtoString()
-
-
-
Method Detail
-
getStatus
public DebugState.Status getStatus()
- Returns:
- the status
-
getCurrentMethod
public String getCurrentMethod()
- Returns:
- the current method
-
getCurrentPC
public int getCurrentPC()
- Returns:
- the current PC
-
getCurrentLine
public int getCurrentLine()
- Returns:
- the current line
-
getCallDepth
public int getCallDepth()
- Returns:
- the call depth
-
getInstructionCount
public long getInstructionCount()
- Returns:
- the instruction count
-
getHitBreakpoint
public Breakpoint getHitBreakpoint()
- Returns:
- the hit breakpoint
-
getCallStack
public List<StackFrameInfo> getCallStack()
- Returns:
- the call stack
-
getLocals
public LocalsSnapshot getLocals()
- Returns:
- the locals
-
getOperandStack
public StackSnapshot getOperandStack()
- Returns:
- the operand stack
-
isPaused
public boolean isPaused()
- Returns:
- true if the status is PAUSED
-
isRunning
public boolean isRunning()
- Returns:
- true if the status is RUNNING or STEPPING
-
isFinished
public boolean isFinished()
- Returns:
- true if the status is COMPLETED, EXCEPTION or ABORTED
-
isAtBreakpoint
public boolean isAtBreakpoint()
- Returns:
- true if a breakpoint was recorded as hit
-
-