[Soot-list] How to insert IfStmt before an existing stmt and How to modify a method definition?

Jin Li lijin1988 at gmail.com
Sun Aug 3 22:39:52 EDT 2014


Hi All,

I searched the soot tutorials, but I didn't find answers to my questions.

1, I want to insert IfStmt before an existing Stmt. e.g.:

  before:

    virtualinvoke r6.<java.io.OutputStream: void
write(byte[]),int,int>(r2,0,$i0);

after:
    if  local ==1 goto label 0;
    goto label1;
  label0:
    staticinvoke ...
 label1:
    virtualinvoke r6.<java.io.OutputStream: void
write(byte[]),int,int>(r2,0,$i0);

2, I want to modify a method definition. e.g.

  before:   public void A(int, init)
  after:     public int  A(int,init,boolean,boolean)

Any suggestions and code snippets are welcome!

Thank you.  Looking forward your suggestions!

Best regards,
Jin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140804/097cd3b7/attachment.html 


More information about the Soot-list mailing list