[jboss-user] [Javassist] - problem analyzing a stack frame

Luca Ferrari do-not-reply at jboss.com
Tue Aug 17 12:25:59 EDT 2010


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&containerType=14&container=2062]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100817/2ee2f015/attachment.html 


More information about the jboss-user mailing list