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

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Mon Jan 20 09:20:42 EST 2014


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
> 


More information about the Soot-list mailing list