Examples of JLocation


Examples of org.apache.kato.jvmti.javaruntime.model.JLocation

    long cPos = variablesIn.getStreamPosition(); // Save where we are before reading in the declaring class
    JClass clazz = (JClass) nreadReference(declaringClass);
    variablesIn.seek(cPos); // Return to our read position

    JStackFrame jsf = new JStackFrame();
    JLocation loc = new JLocation();
    JMethod jm = model.getMethod(methodID);
    loc.method = jm;
   
    jsf.setLocation(loc);
   
    // SRDM
    if( clazz != null) {
      loc.filename = clazz.sourceFile;
    }
    t.addStackFrame(jsf);
   
    byte depth = variablesIn.readByte();
    if (depth == CJVMTI_LOCAL_NATIVECALL) {
      log.log(Level.FINEST, "Native call");
      loc.linenumber = -1;

      loc.setAddress(-1);   
      if (loc.filename == null){
        loc.filename = "nativeCall"; // ..
      }
      return
    } else if (depth == CJVMTI_JVMTI_ERROR) {
      // If there are no local variables, we can still have a frame for the method.
      log.log(Level.FINEST, "Data unavailable");

      loc.linenumber = -1;
      loc.setAddress(-1);
      loc.setCompilationLevel(1);
     
      return;
    } else if (depth != CJVMTI_LOCAL_VARIABLE) {
      log.finer("Error reading frame type. Got "+depth);
      throw new IOException("Error reading frame "+pos+" in thread. "+t+
          ". Error reading frame type. Got "+depth);     
    }

    log.log(Level.FINEST, "Local var");
   
    loc.setCompilationLevel(0);
   
    if (clazz != null) {
      loc.filename = clazz.sourceFile;
    }
   
    long location = variablesIn.readLong();
    log.log(Level.FINEST, "Location is " + location);
   
    loc.setAddress(location);
   
    loc.linenumber = loc.method.getLineNumber(location);
    log.log(Level.FINEST, " Line number " + loc.linenumber + " to "
        + location);
    int varCount = variablesIn.readInt();
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.