[Soot-list] Get java code of a jimple local

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Wed Jul 9 00:08:14 EDT 2014


Hello,

I am not sure I understand the question - what do you really mean by  
'invoker'?

But I can answer the wider question. The transformation to Jimple is  
unidirectional,
so you cannot know what was the original Java code. However, Jimple  
statements can be
annotated with tags that include the source file and the line number.  
So you can use that
information to look at the right part of the Java code if you need.


qpj <412832527 at qq.com> a écrit :

> Hi All,
> To show my question clearly, I'd like take the following code as an  
> example, in java code:
> A a = getA();
> a.f();
> I need to get the invoker of f() is getA(). While in Jimple code,  
> above code is transferred into:
> A a = $r1;
> $r1 = getA();
> $r1.f();
> When I get stmt $r1.f() and invoker $r1, I'd like to know the java  
> source code of the invoker $r1, here obviously is getA(). My  
> question is does Soot provide any API to get java source code of a  
> Jimple local.‍
> Any help will be appreciated.
> Xiangxing


-- 
Marc-André Laverdière-Papineau
Doctorant - PhD Candidate



More information about the Soot-list mailing list