[Soot-list] extracing actual value from local variable

Paris Yiapanis yiapanip at cs.man.ac.uk
Tue Jun 8 07:03:59 EDT 2010


Thank you very much Eric. This was really helpful. I'll try doing this
instead.

- Paris

On Tue, Jun 8, 2010 at 11:52 AM, Eric Bodden <
bodden at st.informatik.tu-darmstadt.de> wrote:

> > I was trying to cast the value to an IntConstant after it has been
> assigned
> > but I was getting an error that 'JimpleLocal' cannot be cast to
> > 'IntConstant'.
>
> You must not cast the Local but instead the right-hand-side value of
> the assignment.
>
> So from your statement "if i1 < 1" search backwards in the
> control-flow graph until you hit an assignment "i1 = <whatever>". Then
> check whether "<whatever>" is of type IntConstant, and if it is then
> cast it.
>
> Hope that helps,
> Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100608/d838ae01/attachment.html 


More information about the Soot-list mailing list