Package com.sun.jdi

Examples of com.sun.jdi.StackFrame.thisObject()


      ret.setStackFrame(eStackFrame);
      eStackFrame.setThread(eThread);
      eStackFrame.setDepth(frames.size()-index);
      eStackFrame.setMethod(createQueryMethod(stackFrame.location().method()));
     
      if(stackFrame.thisObject()!=null)
        eStackFrame.setThisObject(createQueryObjectReference(stackFrame.thisObject()));
     
      index++;
      if(index<frames.size())
        {
View Full Code Here


      eStackFrame.setThread(eThread);
      eStackFrame.setDepth(frames.size()-index);
      eStackFrame.setMethod(createQueryMethod(stackFrame.location().method()));
     
      if(stackFrame.thisObject()!=null)
        eStackFrame.setThisObject(createQueryObjectReference(stackFrame.thisObject()));
     
      index++;
      if(index<frames.size())
        {
        eStackFrame.setPreviousStackFrameLocation(getStackFrameLocation(eThread, frames, index));
View Full Code Here

    EStackFrame ret=new EStackFrame();
    ret.setThread(eThread);
    ret.setDepth(frames.size()-index);
    ret.setMethod(createQueryMethod(stackFrame.location().method()));
   
    if(stackFrame.thisObject()!=null)
      ret.setThisObject(createQueryObjectReference(stackFrame.thisObject()));
   
    index++;
    if(index<frames.size())
      {
View Full Code Here

    ret.setThread(eThread);
    ret.setDepth(frames.size()-index);
    ret.setMethod(createQueryMethod(stackFrame.location().method()));
   
    if(stackFrame.thisObject()!=null)
      ret.setThisObject(createQueryObjectReference(stackFrame.thisObject()));
   
    index++;
    if(index<frames.size())
      {
      ret.setPreviousStackFrame(getStackFrame(eThread, frames, index));
View Full Code Here

      LocalVariable localVariable;
      localVariable = stackFrame.visibleVariableByName(name);
      if (localVariable != null) {
        stackFrame.setValue(localVariable, value);
      } else {
        ObjectReference thisObj = stackFrame.thisObject();
        if (thisObj == null) {
          return "can't find field or variable with name '"+name+"'";
        }
        ReferenceType refType = thisObj.referenceType();
        Field field = refType.fieldByName(name);
View Full Code Here

    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

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

    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

  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

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.