[Soot-list] distinguish read and write operations

Rohan Padhye rohanpadhye at cse.iitb.ac.in
Wed Mar 13 00:34:39 EDT 2013


Hi Nuno,

You can check which of assignStmt.getLeftOp() or assignStmt.getRightOp() 
is an instance of FieldRef, thereby distinguishing loads from stores. 
The FieldRef would either be in the leftOp (store), the rightOp (load) 
or neither (simple assignment), but not both.


On Wednesday 13 March 2013 12:38 AM, Nuno Machado wrote:
> Hi everyone,
>
> I am interested in analyzing differently reads and writes to some static and object fields, so I was wondering if Soot has any way to distinguish between these two kinds of operations (or to identify loads or stores).
>
> At the moment I am trying to do that by checking whether a statement is an instance of AssginStmt and if the field that I want to analyze is within the ValueBoxes of the stmt, but I believe that this is far from being the best approach.
>
>
> Thank you in advance!
>
> Best regards,
> Nuno
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list

-- 
Regards,
Rohan Padhye



More information about the Soot-list mailing list