[Soot-list] Problems with soot call graph

luca mitch_ing at yahoo.it
Wed Jun 22 13:46:12 EDT 2005


Hi, 
I've just upgaded Soot to the last version.
Now I have a problem building the call graph.
I'll report the code and the error message:
CODE:
// set soot options:
		Options.v().set_keep_line_number(true); //might be
useful if you want to relate back to source code
		Options.v().setPhaseOption("jb",
"use-original-names:true");
		Options.v().setPhaseOption("cg",
"safe-forname:false");
		Options.v().setPhaseOption("cg", "context:1cfa");
//you can set context-sensitivity of call graph with
this (more time consuming)
		Options.v().setPhaseOption( "cg", "verbose:true" );
		Options.v().set_allow_phantom_refs(false);  //if
call graph is still slow, you could play around with
this setting
		Options.v().set_whole_program(true);
		Options.v().set_app(true);
		firstclass.setApplicationClass();
		
		Vector temp = new Vector();
		temp.add(ep_metod);
		Scene.v().setEntryPoints(temp);
		
		
		new CallGraphBuilder().build();

Some remarks about the code:
I want to build a partial call graph ( i want to buld
call graph only for some user defined classes
specified in the vector temp).
this code worked with an old version of Soot (2.1.0).
Now i'm going to report the error:

Warning: using incomplete callgraph containing only
application classes.
Exception in thread "main"
java.lang.NullPointerException
	at soot.AnySubType.v(AnySubType.java:44)
	at
soot.toolkits.exceptions.ThrowableSet$Manager.<init>(ThrowableSet.java:239)
	at
soot.Singletons.soot_toolkits_exceptions_ThrowableSet_Manager(Singletons.java:1005)
	at
soot.toolkits.exceptions.ThrowableSet$Manager.v(ThrowableSet.java:274)
	at
soot.toolkits.exceptions.PedanticThrowAnalysis.mightThrow(PedanticThrowAnalysis.java:68)
	at
soot.toolkits.graph.ExceptionalUnitGraph.getExceptionDests(ExceptionalUnitGraph.java:803)
	at
soot.toolkits.graph.ExceptionalUnitGraph.buildHeadsAndTails(ExceptionalUnitGraph.java:766)
	at
soot.toolkits.graph.ExceptionalUnitGraph.initialize(ExceptionalUnitGraph.java:283)
	at
soot.toolkits.graph.ExceptionalUnitGraph.<init>(ExceptionalUnitGraph.java:148)
	at
soot.toolkits.graph.ExceptionalUnitGraph.<init>(ExceptionalUnitGraph.java:180)
	at
soot.toolkits.scalar.LocalSplitter.internalTransform(LocalSplitter.java:78)
	at
soot.BodyTransformer.transform(BodyTransformer.java:51)
	at soot.Transform.apply(Transform.java:104)
	at
soot.JimpleBodyPack.applyPhaseOptions(JimpleBodyPack.java:61)
	at
soot.JimpleBodyPack.internalApply(JimpleBodyPack.java:93)
	at soot.Pack.apply(Pack.java:120)
	at
soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:115)
	at
soot.SootMethod.getBodyFromMethodSource(SootMethod.java:80)
	at
soot.SootMethod.retrieveActiveBody(SootMethod.java:304)
	at
soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod(OnFlyCallGraphBuilder.java:182)
	at
soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables(OnFlyCallGraphBuilder.java:81)
	at
soot.jimple.toolkits.callgraph.CallGraphBuilder.build(CallGraphBuilder.java:94)
	at graphs.CallGAnalysis.build(CallGAnalysis.java:112)
	at
graphs.CallGAnalysis.getMethodList(CallGAnalysis.java:131)
	at CallGraphStub.main(CallGraphStub.java:110)

This is a NullPointerexception raised when I try to to
call  the Soot CallGraphBuilder.build().
Can anyone tell me more about this problem?

Many thanks
Luca Cavallaro



	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it


More information about the Soot-list mailing list