예제 #1
0
 @Nullable
 public StackFrame getStackFrame() {
   try {
     return myThreadReference.frame(myIndex);
   } catch (Throwable t) {
     LOG.error(t);
     return null;
   }
 }
 /** if this line can not be current => stepOver & return true. return false on the other hand. */
 boolean resolveCanBeCurrent(ThreadReference tr) {
   try {
     Location l = tr.frame(0).location();
     if (l == null) return false;
     return resolveCanBeCurrent(
         tr, Utils.getLineForSource(l.declaringType().name(), l.sourceName(), l.lineNumber()));
   } catch (Exception e) {
   }
   return false;
 }
예제 #3
0
 public Value getLocalVariableValue(ThreadReference tr, int frameIdx, String localName)
     throws AbsentInformationException, IncompatibleThreadStateException {
   StackFrame fr = tr.frame(frameIdx);
   Value ret = null;
   LocalVariable var = fr.visibleVariableByName(localName);
   if (var != null) {
     ret = fr.getValue(var);
   }
   return ret;
 }
예제 #4
0
파일: ThreadInfo.java 프로젝트: rzel/xruby
 /**
  * Get the current stackframe.
  *
  * @return the current stackframe.
  */
 public StackFrame getCurrentFrame() throws IncompatibleThreadStateException {
   if (thread.frameCount() == 0) {
     return null;
   }
   return thread.frame(currentFrameIndex);
 }