[Soot-list] How could I get detail in method?

Bernhard Berger berber at tzi.de
Wed Mar 13 05:11:24 EDT 2013


Hi Jesse,

have you tried to get the information from inside a Transformer? I'm not sure if the data still exists after soot.Main.main has finished.

Just add a scene transformer that gathers the information you want to know.

Regards,

Bernhard 

Am 13.03.2013 um 09:53 schrieb 贾翕 <g.jessejia at gmail.com>:

> Hey,
>      I want to know some details (such as which methods are invoked, which variables are used and defined) in 
> method, How could I do?
>     After check API, I thought  the Class Body may help me, but in my code, method don't have a active body.
> So, I don't know how to do with it and need a help.
>    Below is my source code, hope it can help you understand my situation:
> 
>     public static void main(String[] args){
> 		ArrayList<String> argList = new ArrayList<String>();
> 		argList.add("-no-bodies-for-excluded");
> 		argList.add("-pp");
> 		argList.add("DivisorDigits");
> 		
> 		Pack wjtp = PackManager.v().getPack("wjtp");
> 		wjtp.add(new Transform("wjtp.testrdpoint", new TestRdProgramPoint()));
> 		
> 		soot.Main.main(argList.toArray(new String[0]));
> 		
> 		List<SootMethod> methods = soot.Scene.v().getApplicationClasses().getFirst().getMethods();
> 		Iterator<SootMethod> it =  methods.iterator();
> 		while(it.hasNext()){
> 			//I want get some details about method at here, but I don't know the solution. 
> 		}
> 	}
> 
>  Thanks a lot.
> 
> Jesse
> _______________________________________________
> 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