0 Replies Latest reply on Aug 17, 2010 12:24 PM by cat4hire

    problem analyzing a stack frame

    cat4hire

      Hi,

      I'm trying to abalyze a simple method stack frame in order to get some informations about the status of local variables. I'm able to extract the name of the variables thru the code attribute and the constant pool as follows:

       

       

      MethodInfo mInfo = method.getMethodInfo();

          CodeAttribute ca = mInfo.getCodeAttribute();

          LocalVariableAttribute lva = (LocalVariableAttribute) ca.getAttribute( LocalVariableAttribute.tag );

          ConstPool constantPool = lva.getConstPool();
          for( int i = 0; i< lva.tableLength(); i++ ){
              String currentName = constantPool.getUtf8Info( lva.nameIndex(i) );

       

      but what I'd like to have is the value also of such variables at the time I analyze the method on the stack. I don't understand how I can access the stack using the local variable table to get their value, anyone can help me?