Options.v().set_exclude does not work when create callgraph
I set a series to ignore when creating the call graph, however, the source node of the call graph still contains these packages.
Below is the detailed configuration:
G.v().resetSpark(); G.reset(); List<String> processDirs = new ArrayList<String>(); processDirs.add(“C:/test_soot/”); Options.v().set_process_dir(processDirs); Options.v().set_soot_classpath("C:/java/jdk1.8.0_131/jre/lib/jce.jar;C:/java/jdk1.8.0_131/jre/lib/rt.jar;"); Options.v().set_prepend_classpath(true); List<String> excludedList = new ArrayList<String>();
String ignored ="sun.awt.;java.;javax.print;java.net.;sun.misc.;java.lang.;java.util.;java.awt.;javax.swing.;sun.awt.;sun.swing.;org.netbeans.;com.sun.;org.openide.;com.ibm.crypto.;com.ibm.security.;org.apache.xerces.*";
String [] ssts = ignored.split(";"); for(String unit:ssts){ excludedList.add(unit); }
Options.v().set_exclude(excludedList); Options.v().set_allow_phantom_refs(true); Options.v().set_verbose(true); Options.v().set_whole_program(true);
Options.v().set_keep_line_number(true); Options.v().set_throw_analysis(Options.throw_analysis_unit); Options.v().set_debug(true); Options.v().set_debug_resolver(true); Options.v().set_output_format(Options.output_format_none); Options.v().setPhaseOption("cg.spark", "on,vta:true"); Options.v().set_no_bodies_for_excluded(true);
@newthis I have the same problem,set_exclude not work
i'm get into same situation cry