[Soot-list] VerifyError while instrumenting with Chain.insertBefore() method.
Neetha Maria Sebastian
neetha.sebastian at gmail.com
Tue Jun 15 16:32:36 EDT 2010
I have not had success passing these options to soot. I tried to include it
in the call to soot.Main.main() but it said they were not valid args.
The class file gets called from an ant file like this :
<java
classname="javato.activetesting.instrumentor.InstrumentorForActiveTesting"
fork="true" dir="${javato.work.dir}" maxmemory="1024m">
<arg value="-keep-line-number"/>
<arg line="${javato_instops}"/>
<arg value="-no-output-inner-classes-attribute"/>
<arg value="-d"/>
<arg file="${javato.work.dir}/tmpclasses"/>
<arg value="-x"/>
<arg value="javato"/>
<arg value="--app"/>
<arg value="${javato.app.main.class}"/>
<classpath>
<pathelement location="${javato.home.dir}/classes"/>
<pathelement location="${javato.home.dir}/lib/soot.jar"/>
<path refid="javato_app_class_path"/>
</classpath>
</java>
Which is the right place to put the args here?
Thanks
Neetha
On Tue, Jun 15, 2010 at 3:14 PM, Patrick Lam <plam at sable.mcgill.ca> wrote:
> On 15/06/10 03:03 PM, Neetha Maria Sebastian wrote:
>
>> Hi,
>>
>> The program I work with produces .class files as output and not .jimple
>> files. I tried to convert them into jimple, but am not sure how to do
>> that. I am attaching the class files produced by the program with this
>> email.
>>
>> I changed the code a bit and am now calling into "myIfBefore" function
>> so that you could distinguish between my invokestatic calls and the rest
>> of the programs invokestatic calls.
>>
>> My visitBinaryExpr code has therefore become:
>>
>> public void visitBinopExpr(SootMethod sm, Chain units, Stmt s, BinopExpr
>> expr, BinopExprContext context) {
>> nextVisitor.visitBinopExpr(sm, units, s, expr, context);
>> Value left = expr.getOp1();
>> Value right = expr.getOp2();
>> if( s instanceof IfStmt) {
>> System.out.println(" Found an if statement : " + s.toString());
>> addCallWithObject(units, s, "myIfBefore", left, false);
>> //addCallWithObjectInt(units, s, "myReadBefore", leftOp,
>> IntConstant.v(4), true);
>> }
>> }
>>
>> I am not sure how I can convert a .class file into .jimple. Could you
>> also tell me how to do this?
>>
>
> If you can pass arguments to Soot, give it the -f j argument. To go from
> the class file to Jimple, run Soot something like this:
>
> java soot.Main -f j (class file)
>
> making sure to include the appropriate classpath.
>
> Please continue to reply to the soot list.
>
> pat
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100615/4c1dd49b/attachment.html
More information about the Soot-list
mailing list