[Soot-list] Soot Question: Jimple Line Numbers

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Sun Oct 16 08:58:11 EDT 2011


Hi Shirley.

In the future, please send your questions to the Soot list so that
others can help answer your question or benefit from the answers.

About your question: When you print a Jimple body using
soot.Printer.printTo(Body,PrintWriter) then this should add
JimpleLineNumbeTag instances to the units. Those you should then be
able to extract. You can pass a "fake" PrintWriter to the method and
then extract the tags afterwards.

Eric

On 14 October 2011 17:44, Shirley Park <smp2as at virginia.edu> wrote:
> Hello,
>   I'm working on a project that takes a .class file and transforms it into a
> .jimple file. I need to create a mapping between the .jimple statements'
> line numbers and the associated .class file statement's line number it came
> from (i.e. the jimple statement r0 := @this:  came from the 2nd line of a
> .class file, and was written to the 3rd line of the jimple file.) I've been
> able to extract the .class file line numbers, but not the .jimple ones. I've
> included the -keep-line-number argument, but can only get null values. How
> should I approach this problem?
> Thanks,
> Shirley
>



-- 
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt


More information about the Soot-list mailing list