[Soot-list] Bytecode level transformer

Ivan Postolski ivan.postolski at gmail.com
Thu Jun 27 17:08:08 EDT 2013


Thanks to everyone for the quick reply. I will dig into the options you all
have mentioned. I think I was looking for some solution like the one Patric
wrote but I also will keep an eye on the others ways.


Ivan.-


On Wed, Jun 26, 2013 at 11:27 PM, Patrick Lam <plam at sable.mcgill.ca> wrote:

> Almo is correct. It is possible to do analyses and transformations in
> Baf. However, in response to Ivan's original post: usually, thinking at
> the bytecode level is the wrong thing. Most likely, you want to figure
> out which Jimple statements correspond to the phenomenon that you're
> looking for, and write an analysis that handles those.
>
> The original question talked about reading a value from the heap. That
> would be an AssignStmt with right-hand side instanceof FieldRef or
> ArrayRef.
>
> pat
>
> On 06/26/13 21:49, Almo wrote:
> > Yea, but it's also an internal representation of raw bytecode (i.e. like
> > coffi, objectweb's asm, or bcel).
> >
> > Looking at the baf body class, it is constructed from jimple,
> > https://github.com/Sable/soot/blob/develop/src/soot/baf/BafBody.java
> >
> > Al
> >
> > ------------------------------------------------------------------------
> > *From:* Marc-André Laverdière-Papineau
> > <marc-andre.laverdiere-papineau at polymtl.ca>
> > *To:* "soot-list at sable.mcgill.ca" <soot-list at sable.mcgill.ca>
> > *Sent:* Wednesday, June 26, 2013 7:36 PM
> > *Subject:* Re: [Soot-list] Bytecode level transformer
> >
> > Isn't that an output option?
> >
> > You can have the following round trip
> >
> > .class -> jimple -> analyses -> .class
> >
> > And there are other output options:
> > http://www.sable.mcgill.ca/soot/tutorial/intro/
> >
> >
> > Marc-André Laverdière-Papineau
> > Doctorant - PhD Candidate
> >
> > On 26/06/13 09:26 PM, Al wrote:
> >  > You could convert jimple to baf (java bytecode).
> >  >
> >  > Al
> >  >
> >  > On Jun 26, 2013, at 7:39 PM, Marc-André Laverdière-Papineau
> > <marc-andre.laverdiere-papineau at polymtl.ca
> > <mailto:marc-andre.laverdiere-papineau at polymtl.ca>> wrote:
> >  >
> >  >> Hello,
> >  >>
> >  >> Soot normally works at a higher level representation, called Jimple,
> >  >> which is somewhere between Java and the bytecode.
> >  >>
> >  >> There is a representation called Coffi that you can use to deal with
> the
> >  >> bytecode, but I don't think that a lot of the analyses will work on
> > coffi.
> >  >>
> >  >> But my question is why you would like to work on the bytecode in the
> >  >> first place?
> >  >>
> >  >> Marc-André Laverdière-Papineau
> >  >> Doctorant - PhD Candidate
> >  >>
> >  >> On 26/06/13 05:47 PM, Ivan Postolski wrote:
> >  >>> Hello Soot List, newbie question:
> >  >>>
> >  >>> I'm currently coding a body transformer on soot and want to know how
> >  >>> get the bytecode instructions that read a value from the heap, like
> >  >>> aaload or getfield, and then do some transforming after those. Is
> this
> >  >>> possible with soot and Jimple?
> >  >>>
> >  >>> I also want to get into the invokes and the bytecode them point to.
> > like
> >  >>> "iterator.next()"
> >  >>>
> >  >>> Thanks
> >  >>>
> >  >>> Ivan.-
> >  >>>
> >  >>>
> >  >>> _______________________________________________
> >  >>> Soot-list mailing list
> >  >>> Soot-list at sable.mcgill.ca <mailto:Soot-list at sable.mcgill.ca>
> >  >>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >  >> _______________________________________________
> >  >> Soot-list mailing list
> >  >> Soot-list at sable.mcgill.ca <mailto:Soot-list at sable.mcgill.ca>
> >  >> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >  >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca <mailto:Soot-list at sable.mcgill.ca>
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >
> >
> >
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130627/470b9156/attachment-0001.html 


More information about the Soot-list mailing list