Luca Ferrari [
http://community.jboss.org/people/cat4hire] created the discussion
"problem analyzing a stack frame"
To view the discussion, visit:
http://community.jboss.org/message/557716#557716
--------------------------------------------------------------
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?
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/557716#557716]
Start a new discussion in Javassist at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]