public OnFlyCallGraphBuilder(ContextManager cm, ReachableMethods rm) { this.cm = cm; this.rm = rm; worklist = rm.listener(); options = new CGOptions(PhaseOptions.v().getPhaseOptions("cg")); if (!options.verbose()) { logger.debug("" + "[Call Graph] For information on where the call graph may be incomplete," + "use the verbose option to the cg phase."); } if (options.reflection_log() == null || options.reflection_log().length() == 0) { if (options.types_for_invoke() && new SparkOptions(PhaseOptions.v().getPhaseOptions("cg.spark")).enabled()) { reflectionModel = new TypeBasedReflectionModel(); } else { reflectionModel = new DefaultReflectionModel(); } } else { reflectionModel = new TraceBasedReflectionModel(); } this.fh = Scene.v().getOrMakeFastHierarchy(); }
@Override public void methodInvoke(SootMethod container, Stmt invokeStmt) { if (!warnedAlready(container)) { if (options.verbose()) { logger.warn("call to " + "java.lang.reflect.Method: invoke() from " + container + "; graph will be incomplete!"); } markWarned(container); } }
public OnFlyCallGraphBuilder( ContextManager cm, ReachableMethods rm ) { this.cm = cm; this.rm = rm; worklist = rm.listener(); options = new CGOptions( PhaseOptions.v().getPhaseOptions("cg") ); if( !options.verbose() ) { G.v().out.println( "[Call Graph] For information on where the call graph may be incomplete, use the verbose option to the cg phase." ); } // if(options.reflection_log()==null || options.reflection_log().length()==0) { reflectionModel = new DefaultReflectionModel(); // } else { // reflectionModel = new TraceBasedReflectionModel(); // } } public OnFlyCallGraphBuilder( ContextManager cm, ReachableMethods rm, boolean appOnly ) {
public OnFlyCallGraphBuilder( ContextManager cm, ReachableMethods rm ) { this.cm = cm; this.rm = rm; worklist = rm.listener(); options = new CGOptions( PhaseOptions.v().getPhaseOptions("cg") ); if( !options.verbose() ) { G.v().out.println( "[Call Graph] For information on where the call graph may be incomplete, use the verbose option to the cg phase." ); } // if(options.reflection_log()==null || options.reflection_log().length()==0) { reflectionModel = new DefaultReflectionModel(); // } else { // reflectionModel = new TraceBasedReflectionModel(); // } } public OnFlyCallGraphBuilder( ContextManager cm, ReachableMethods rm, boolean appOnly ) {
public void methodInvoke(SootMethod container, Stmt invokeStmt) { if( !warnedAlready(container) ) { if( options.verbose() ) { G.v().out.println( "Warning: call to "+ "java.lang.reflect.Method: invoke() from "+container+ "; graph will be incomplete!" ); } markWarned(container); } }
public void methodInvoke(SootMethod container, Stmt invokeStmt) { if( !warnedAlready(container) ) { if( options.verbose() ) { G.v().out.println( "Warning: call to "+ "java.lang.reflect.Method: invoke() from "+container+ "; graph will be incomplete!" ); } markWarned(container); } }
@Override public void methodInvoke(SootMethod container, Stmt invokeStmt) { if (container.getDeclaringClass().isJavaLibraryClass()) { super.methodInvoke(container, invokeStmt); return; } InstanceInvokeExpr d = (InstanceInvokeExpr) invokeStmt.getInvokeExpr(); Value base = d.getArg(0); // TODO no support for statics at the moment // SA: Better just fall back to degraded functionality than fail // altogether if (!(base instanceof Local)) { super.methodInvoke(container, invokeStmt); return; } addInvokeCallSite(invokeStmt, container, d); } }