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

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Nov 26 16:14:51 EST 2008


Hi Joe.

I have never tried to add functionality after main(..) has completed
running. I am sure it can be done but it could be painful. What
exactly are you trying to achieve? Why can't you run your code from
within the control flow of Soot's main method?

Eric

2008/11/26 Joe Roback <robackja at cs.arizona.edu>:
> 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
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
Eric Bodden
Sable Research Group, McGill University, Montréal, Canada
Got an interesting job offer? http://www.bodden.de/hire-me/


More information about the Soot-list mailing list