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

Steven Arzt Steven.Arzt at cased.de
Mon Aug 4 05:00:21 EDT 2014


Hi Jin,

 

Have you looked into our Android instrumentation tutorial we gave at RV’2013 and CCS’2013? Most of the stuff we explain there also applies to normal Java programs. You can find the tutorial here: http://sseblog.ec-spride.de/tutorials/

 

Best regards,

  Steven

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA] Im Auftrag von Jin Li
Gesendet: Montag, 4. August 2014 04:40
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] How to insert IfStmt before an existing stmt and How to modify a method definition?

 

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/bd477e60/attachment.html 


More information about the Soot-list mailing list