[Soot-list] (no subject)

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Thu Oct 24 13:24:37 EDT 2013


Hello,

There has been some bugs on the "use-original-names" option. Are you
using 2.5.0 or the development branch? If 2.5, I encourage you to build
Soot from source from the dev branch and let us know what happens.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 10/24/2013 04:49 AM, Yu Adam wrote:
> Greetings !
> I want to instrument a .class file to output some values at runtime,
> while I found that when acheiving the cfg of the instrumented method,
> the option "use-original-names:true" doesn't work, so that the values
> cann't be mapped. The code of getting cfg is as shown below:
> 
> PhaseOptions.v().setPhaseOption("jb","use-original-names:true");
> Body methodBody=method.retrieveActiveBody();
> ExceptionalUnitGraph graph = new ExceptionalUnitGraph(methodBody);
> Unit i=null;
> Iterator<Unit>  it = graph.iterator();
> while(it.hasNext()){
> i=it.next();
> System.out.println(i.toString());
> }
> 
> I also have tried the soot.Main.main(args). Certainly, the original
> .class can get the right cfg. I used the example
> on http://www.sable.mcgill.ca/soot/tutorial/profiler2/ and get the same
> result. The original cfg of the method "main" in class "TestInvoke" is:
> args := @parameter0: java.lang.String[]
> i = 0
> goto [?= (branch)]
> staticinvoke <TestInvoke: void foo()>()
> i = i + 1
> ...
> 
>  while the cfg of the instrumented method shows as:
> l0 := @parameter0: java.lang.String[]
> l0 = 0
> goto [?= (branch)]
> staticinvoke <MyCounter: void increase(int)>(1)
> staticinvoke <TestInvoke: void foo()>()
> l0 = l0 + 1
> ...
> The option keep_line_number has the same situation.
> Can anyone help ?
> 
> Best regards!
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list