[Soot-list] Possible to use SootClass object outside of transform() ?

Joe Roback robackja at cs.arizona.edu
Wed Nov 26 16:03:53 EST 2008


Hello All.

I am working on a continuous-replacement project with Christian
Collberg here at the University of Arizona. In the project we need to
keep SootClass objects around and manipulate them after-the-fact (ie
after soot.Main is run). Is this feasible?

if I try to even write out a SootClass using JasminClass outside the
transform() I get errors of "no active body". Backtrace looks like
this:

java.lang.RuntimeException: method: <init> has no active body!
	at soot.AbstractJasminClass.emitMethod(AbstractJasminClass.java:687)
	at soot.AbstractJasminClass.<init>(AbstractJasminClass.java:568)
	at soot.jimple.JasminClass.<init>(JasminClass.java:62)
	at server.blockify.SootOutput.writeByteArray(SootOutput.java:74)
	at server.blockify.BlockifiedBlock.getClassBytes(BlockifiedBlock.java:68)
	at server.blockify.BlockifiedBag.getBlock(BlockifiedBag.java:47)
	at server.components.Scheduler_c.processClientRequest(Scheduler_c.java:98)
	at server.components.BlockProvider_c.run(BlockProvider_c.java:37)
	at server.components.ServerInstance_c.startServerInstance(ServerInstance_c.java:78)
	at server.control.ServerApplication_c.run(ServerApplication_c.java:115)
	at java.lang.Thread.run(Thread.java:613)

So, is this feasible thing to do with SOOT? or must all SOOT related
manipulations happen within the SOOT tranformations?

thanks. much appreciate the help.

Joe Roback


More information about the Soot-list mailing list