[Soot-list] Detecting all values passed to a method

sltz slayerz at gmail.com
Tue Apr 5 11:48:24 EDT 2016


Hi,
I'm trying to analyze a program so I can detect all values passed to a 
method. I've been reading and playing with Soot for a while now, but I just 
can't seem to figure the right way to do this.
I even resorted to making the initial values "final" in hope of using the 
ConstantPropagatorAndFolder, which didn't seem to detect them at all.

I have the following program:
=======================

*package* main;


*public* *class* Main

{

  *public* *static* *final* *int* toFind = 11;

  *public* *static* *final* *int* toFindTwo = 15;

  

  *public* *static* *void* main(String[] args)

  {

    secondMethod(11, 15);

  }

  

  *public* *static* *void* secondMethod(*int* x, *int* y)

  {

    thirdMethod(x, y);

  }

  

  *public* *static* *void* thirdMethod(*int* x, *int* y)

  {

    TestClass testClass = *new* TestClass();

    testClass.testMethod(x);

    testClass.testMethod(y);

  }

}

=======================


And I'd like to be able to analyze all calls to "testMethod" and output the 
values of [11, 15].

Could anyone please point me in the right direction as to which 
techniques/classes/analyses I should use? Is it possible at all?

As the next step, I'd like to be able to do this even if toFind and 
toFindTwo are not "final".


Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160405/259fde8e/attachment-0001.html 


More information about the Soot-list mailing list