Package com.sun.jdi

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


   
    StackFrame stackFrame = frames.get(index);
   
    EStackFrameLocation ret=new EStackFrameLocation();
    ret.setStackFrame(eStackFrame);
    ret.setLineNumber(stackFrame.location().lineNumber());
   
    if(eStackFrame==null)
      {
      eStackFrame=new EStackFrame();
      ret.setStackFrame(eStackFrame);
View Full Code Here


      {
      eStackFrame=new EStackFrame();
      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++;
View Full Code Here

        eStackFrame.setPreviousStackFrameLocation(getStackFrameLocation(eThread, frames, index));
        }
     
      try
        {
        eStackFrame.setSourceName(stackFrame.location().sourceName());
        }
      catch (AbsentInformationException e)
        {
        System.out.println(e.getClass().getName() );
        }
View Full Code Here

   
    StackFrame stackFrame = frames.get(index);
    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++;
View Full Code Here

    SuspendThreadStack threadStack = SuspendThreadStack.getInstance();
    try {
      List<StackFrame> frames = threadRef.frames();
      for (int i=0; i<frames.size(); i++) {
        StackFrame frame = frames.get(i);
        Location loc = frame.location();
        String name = loc.declaringType().name() + "."
            + loc.method().name();
        String frameInfo = name + " line: " + loc.lineNumber();
        if (i == threadStack.getCurFrame()) {
          frameInfo = frameInfo + "  (current frame) ";
View Full Code Here

      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

      VirtualMachine vm = debugger.getVm();
      List<ReferenceType> refTypes = vm.classesByName("java.lang."+className);
      if (refTypes !=null && refTypes.size() >0 ) {
        return refTypes.get(0);
      }
      String locSourcePath = stackFrame.location().sourcePath();
      String abPath = ctx.findSourceFile(locSourcePath);
      BufferedReader br = new BufferedReader(new FileReader(abPath));
      Pattern pat = Pattern.compile("import\\s+(.*\\."+className+")\\s*;\\s*$");
      String qualifiedClass = null;
     
View Full Code Here

        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

        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);
View Full Code Here

            // 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.