Exemplo n.º 1
0
 /**
  * Set the current stackframe to a specific frame.
  *
  * @param nFrame the number of the desired stackframe. Frame zero is the closest to the current
  *     program counter
  * @throws IllegalAccessError when the thread isn't suspended or waiting at a breakpoint
  * @throws ArrayIndexOutOfBoundsException when the requested frame is beyond the stack boundary
  */
 public void setCurrentFrameIndex(int nFrame) throws IncompatibleThreadStateException {
   assureSuspended();
   if ((nFrame < 0) || (nFrame >= thread.frameCount())) {
     throw new ArrayIndexOutOfBoundsException();
   }
   currentFrameIndex = nFrame;
 }
Exemplo n.º 2
0
 /**
  * Get the current stackframe.
  *
  * @return the current stackframe.
  */
 public StackFrame getCurrentFrame() throws IncompatibleThreadStateException {
   if (thread.frameCount() == 0) {
     return null;
   }
   return thread.frame(currentFrameIndex);
 }