[Soot-list] distinguish read and write operations

Patrick Lam plam at sable.mcgill.ca
Tue Mar 12 17:56:59 EDT 2013


On 03/12/13 15:08, 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.

Hi Nuno,

Any Stmt (or Unit, actually) is going to define getUseBoxes() and 
getDefBoxes(). The use boxes are what get read, while the def boxes are 
what get written to.

pat




More information about the Soot-list mailing list