[Soot-list] Jimple InvokeExpr with return

Pedro Louro pedrolour at gmail.com
Thu Mar 24 08:07:14 EDT 2011


Hello,

I´m instrumenting a class file, adding some method calls to a observer
class with this code:

SootMethodRef mr = Scene.v().getMethod("<" + observerClass + ": void "
+ "recordInput" + "(java.lang.String,java.lang.String)>").makeRef();
args.addLast(l);
units.insertAfter(Jimple.v().newInvokeStmt(Jimple.v().newStaticInvokeExpr(mr,
args)), assignStmt);

How can I do a similar call but with a method that returns, for
example, an int? I´m not understanding how can I assign the return of
the method to a local.

Thanks for the help.

Best Regards
Pedro Louro


More information about the Soot-list mailing list