[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Printing Jimple
Hi,
I am using the inlined script in beanshell and it fails to print the body of the given class.
void printInfo(sc) {
for(Iterator i = sc.getMethods().iterator(); i.hasNext();)
try {
SootMethod sm = (SootMethod)i.next();
sm.retrieveActiveBody();
} catch (RuntimeException e) {
e.printStackTrace();
}
print("-------------------------------");
t = Printer.v();
t.setOption(Integer.MAX_VALUE);
t.printTo(sc, new java.io.PrintWriter(System.out));
print("===============================================");
}
t.printTo() does nothing. In fact this is all it prints.
-------------------------------
===============================================
Can anybody enlighten me how does one print a JimpleBody in Soot? Also, is there a way to print only the selected methods
instead of printing the whole class?
waiting for reply,
--
Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad