[Soot-list] How to create java.lang.Object variable and boolean constant better when custom an entry point?
Eric Bodden
eric.bodden at uni-paderborn.de
Tue Jun 30 07:32:38 EDT 2020
Hi.
> Q1: Although the above code works, I'm not sure if there is a better way to define the arguments, especially the first (i.e., arg1) and third (i.e., DIntConstant.v(1, BooleanType.v())) arguments.
No your code looks okay to me. I don’t think you can do it much more easily.
> Q2: The callee is a static method, according to Java, it can be called by an instance or a class directly. But if I use "Jimple.v().newVirtualInvokeExpr", it will throw the following error:
> wrong static-ness
> If I change it to "Jimple.v().newStaticInvokeExpr", the code could work. So if the callee is static, I have to use the "newStaticInvokeExpr"?
Exactly. newVirtualInvokeExpr is for virtual (!) invokes, newStaticInvokeExpr is for static invokes. Hence the name ;-)
Cheers
Eric
More information about the Soot-list
mailing list