[Soot-list] input parameters of a soot method

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Wed Feb 9 03:20:31 EST 2011


Hello.

>   Is there a way to extract the input parameters of a method in soot?

Yes that's possible.

Every Soot method with parameters starts with a list of IdentityStmt
objects. Those are just special assignment statement, i.e. have a
left-hand and right-hand side. For parameters the right-hand side
contains a ParameterRef. This, in turn, contains an ID number telling
you which parameter is assigned. To access the parameter, just use the
local on the *left*-hand side, as the ParameterRef is assigned to this
local.

If you print out Jimple code, these statements show up as "r3 =
@parameter1;" or so.

Eric

--
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt


More information about the Soot-list mailing list