Examples of StackFrame


Examples of com.sun.jdi.StackFrame

  public static String fields() {
    ThreadReference threadRef = checkAndGetCurrentThread();
    SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
    StringBuilder sb = new StringBuilder();
    try {
      StackFrame stackFrame = threadRef.frame(threadStack.getCurFrame());
      ObjectReference thisObj = stackFrame.thisObject();
      Map<Field, Value> values = thisObj.getValues(thisObj.referenceType().visibleFields());
      List<String> fieldNames = new ArrayList<String>();
      for (Field field : values.keySet()) {
        fieldNames.add(field.name());
      }
View Full Code Here

Examples of com.sun.jdi.StackFrame

 
  public static Value getJdiValue(Expression exp) {
    ThreadReference threadRef = checkAndGetCurrentThread();
    try {
      SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
      StackFrame stackFrame = threadRef.frame(threadStack.getCurFrame());
      ObjectReference thisObj = stackFrame.thisObject();
      Value value = eval(threadRef, exp, thisObj,false);
      return value;
    } catch (IncompatibleThreadStateException e) {
      throw new ExpressionEvalException("eval expression error, caused by : " + e.getMessage());
    }
View Full Code Here

Examples of com.sun.jdi.StackFrame

      ObjectReference thisObj, boolean hasParents)  {
   
    Value value = null;
    try {
      SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
      StackFrame stackFrame = threadRef.frame(threadStack.getCurFrame());
      if (!hasParents) {
        LocalVariable localVariable;
        localVariable = stackFrame.visibleVariableByName(name);
        if (localVariable != null) {
          return stackFrame.getValue(localVariable);
        }
      }
     
      ReferenceType refType = stackFrame.location().declaringType();
      if (thisObj != null ) {
        refType = thisObj.referenceType();
      }
      Field field = refType.fieldByName(name);
      if (field == null ) {
View Full Code Here

Examples of com.sun.jdi.StackFrame

        LocalVariable var = (LocalVariable) method.variables().get( 0 );//frame

        ClassType frameType = (ClassType) var.type();

        StackFrame frame = getUnderlyingStackFrame();
        Value value = frame.getValue( var );
        //getThread().getTopStackFrame().get

        //IValue value = jdivar.getValue();
        ObjectReferenceImpl o = (ObjectReferenceImpl) value;
View Full Code Here

Examples of com.sun.jdi.StackFrame

                                  -1 );
                }
                int newFrames = newSize - oldSize; // number of frames to create, if any
                int depth = oldSize;
                for ( int i = newFrames - 1; i >= 0; i-- ) {
                    StackFrame currentFrame = (StackFrame) frames.get( i );
                    JDIStackFrame customFrame = createCustomFrame( this,
                                                                   depth,
                                                                   currentFrame );

                    fStackFrames.add( 0,
                                      customFrame );

                    depth++;
                }
                int numToRebind = Math.min( newSize,
                                            oldSize ); // number of frames to attempt to rebind
                int offset = newSize - 1;
                for ( depth = 0; depth < numToRebind; depth++ ) {
                    DroolsStackFrame oldFrame = (DroolsStackFrame) fStackFrames.get( offset );
                    StackFrame frame = (StackFrame) frames.get( offset );
                    DroolsStackFrame newFrame = (DroolsStackFrame) oldFrame.bind( frame,
                                                                                  depth );
                    if ( newFrame != oldFrame ) {
                        fStackFrames.set( offset,
                                          newFrame );
View Full Code Here

Examples of com.sun.jdi.StackFrame

        LocalVariable var = (LocalVariable) method.variables().get( 0 );//frame

        ClassType frameType = (ClassType) var.type();

        StackFrame frame = getUnderlyingStackFrame();
        Value value = frame.getValue( var );
        //getThread().getTopStackFrame().get

        //IValue value = jdivar.getValue();
        ObjectReferenceImpl o = (ObjectReferenceImpl) value;
View Full Code Here

Examples of com.sun.jdi.StackFrame

                                  -1 );
                }
                int newFrames = newSize - oldSize; // number of frames to create, if any
                int depth = oldSize;
                for ( int i = newFrames - 1; i >= 0; i-- ) {
                    StackFrame currentFrame = (StackFrame) frames.get( i );
                    JDIStackFrame customFrame = createCustomFrame( this,
                                                                   depth,
                                                                   currentFrame );

                    fStackFrames.add( 0,
                                      customFrame );

                    depth++;
                }
                int numToRebind = Math.min( newSize,
                                            oldSize ); // number of frames to attempt to rebind
                int offset = newSize - 1;
                for ( depth = 0; depth < numToRebind; depth++ ) {
                    DroolsStackFrame oldFrame = (DroolsStackFrame) fStackFrames.get( offset );
                    StackFrame frame = (StackFrame) frames.get( offset );
                    DroolsStackFrame newFrame = (DroolsStackFrame) oldFrame.bind( frame,
                                                                                  depth );
                    if ( newFrame != oldFrame ) {
                        fStackFrames.set( offset,
                                          newFrame );
View Full Code Here

Examples of com.sun.jdi.StackFrame

                                // re-bind
        int offset = newSize - 1;
        for (depth = 0; depth < numToRebind; depth++) {
          JDIStackFrame oldFrame = (JDIStackFrame) fStackFrames
              .get(offset);
          StackFrame frame = frames.get(offset);
          JDIStackFrame newFrame = oldFrame.bind(frame, depth);
          if (newFrame != oldFrame) {
            fStackFrames.set(offset, newFrame);
          }
          offset--;
View Full Code Here

Examples of com.sun.jdi.StackFrame

    JDIDebugTarget target = (JDIDebugTarget) getDebugTarget();
    if (target.canPopFrames()) {
      // JDK 1.4 support
      try {
        // Pop the frame and all frames above it
        StackFrame jdiFrame = null;
        int desiredSize = fStackFrames.size()
            - fStackFrames.indexOf(frame) - 1;
        int lastSize = fStackFrames.size() + 1; // Set up to pass the
                            // first test
        int size = fStackFrames.size();
View Full Code Here

Examples of com.sun.jdi.StackFrame

        List<MethodInfo> stack = new LinkedList<MethodInfo>();
        if (result.live) {
            // Work with live callstack instead.
            int n = result.liveStack.size();
            for (int i = 0; i < n; i++) {
                StackFrame sf = result.liveStack.get(i);
                MethodInfo method = getTODSession().getClassInformationProvider().getMethodInfo(sf.location().method());
                method.setLineNumber(sf.location().lineNumber());
                stack.add(method);
            }
        }else if(result.lastEvent != null && result.lastEvent instanceof IMethodCallEvent && isStepInto){
            stack = this.getTODSession().getTODHandler().getCallStack(result.lastEvent, isStepInto, isForward, false);
        }else if(result.lastEvent != null && result.afterLastEvent != null && isForward){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.