[Soot-list] method has an invalid active body!
Uwe Dolinsky
u.dolinsky at iname.com
Tue Oct 12 09:51:27 EDT 2004
Hi,
I've written a Jimple transformer that builds (in its internalTransform
method)
a new method using Jimple.
This is a snippet of the code I use before adding statements to that new
method:
DeclClass.addMethod(method);
JimpleBody body = Jimple.v().newBody(method);
method.setActiveBody(body);
When writing out the methods Soot throws the following exception:
Exception in thread "main" java.lang.RuntimeException: method: test2 has an
invalid active body!
at soot.baf.JasminClass.emitMethodBody(JasminClass.java:65)
at soot.AbstractJasminClass.emitMethod(AbstractJasminClass.java:461)
at soot.AbstractJasminClass.<init>(AbstractJasminClass.java:367)
It complains about the method body not being a "BafBody" (in fact it is
a "JimpleBody").
Please advise.
Thanks
Uwe
More information about the Soot-list
mailing list