[Soot-list] Using soot to get the assigned stmt?

Guru Devanla gdevan2 at uic.edu
Mon Jan 20 10:18:46 EST 2014


Hi,

As Marc-André explained the new statement in .java file breaks out into 2
statements in Jimple. So, the question is what you intend to do with the
whole statement? Do you need the exact statement that was in Java or do you
want to reason something about that statement.

If you want to reason something about that statement, you could provide us
with more details and we can try to help.

Thanks
Guru


On Mon, Jan 20, 2014 at 6:20 AM, Marc-André Laverdière <
marc-andre.laverdiere-papineau at polymtl.ca> wrote:

> Hello Xiangxing,
>
> I am going to assume that you are working with Jimple here.
> Jimple is very closely modeled after what the JVM bytecode does.
>
> When it comes to constructors, that means that you actually get two
> statements, an AssignStmt with a new expression, followed by a
> specialinvoke to the <init>(...) method.
>
> Depending on your needs, you may need to find only one of them, or both.
>
> Regards,
>
> Marc-André Laverdière-Papineau
> Doctorant - PhD Candidate
>
> On 01/12/2014 11:42 PM, qpj wrote:
> > Hi Eric,
> > I'd like to get the whole assigned stmt, for example, in my code.java,
> > Intent intent = new Intent(this, Music.class).
> > How can I get the whole stmt above?
> >
> > the code in MyInstrumentor.java
> > public void caseAssignStmt(AssignStmt stmt) {
> > String string = stmt.toString();
> > G.v().out.println(string);
> > ...
> > }
> > the output is like this: $r3 = new android.content.Intent
> >
> > I hope you can help me.
> > Xiangxing
> >
> >
> >
> >
> >
> > _______________________________________________
> > 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/20140120/dee4d3b4/attachment.html 


More information about the Soot-list mailing list