-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi,
I'm a new user of this package. I'm now trying to retrieve the information of local variables as the sample you show on the website http://stephane.godbillon.com/BytecodeParser/.
The problem I encountered when doing this is that I cannot get the local variable for LOAD instructions. Specifically, I use the following code to retrieve the information I want:
@Override
public void handle(Op op, int idx) {
if ((op instanceof LocalVariableOpcode) == false)
return ;
LocalVariableOpcode lv = op.as(LocalVariableOpcode.class);
LocalVariable lvInfo = lv.decode(context, idx).localVariable;
System.out.println(idx + " " + lvInfo.toString() + ": " + lvInfo.name);
}
However, I got NullPointerException of lvInfo when parsing the instruction ILOAD 5 in my program. Is it due to some wrong manipulations or restrictions?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels