[Soot-list] Convert Jimple Value to Bytecode reference

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Thu Aug 19 12:13:51 EDT 2010


Ah, now I see what you mean.

The problem with variables is that there are no local variables in
bytecode. Therefore, there is nothing to match them to. Java bytecode
implements local variables through stack locations. I am not sure if
this is of any help to you but this is the way it is...

Eric

--
Dr. Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



On 19 August 2010 17:22, Goichon Francois <francois.goichon at insa-lyon.fr> wrote:
>
> Hi Eric,
>
> Thanks for the quick reply. When I find a special Value (a Local for
> example) while analyzing Jimple code, I would like to have any pointer
> to that variable in the original Bytecode. For example, the line at
> which its initial load instruction is.
>
> It is just a matter of matching a variable used in a Jimple statement
> to a concrete Bytecode variable. I can find a unit's original line
> number with the associated LineNumberTag and would just like to know
> if there is a comparable mechanism to find a variable's definition.
>
> Thanks,
>
>
> François
>
>> Hi Francois.
>>
>> What exactly do you mean by a bytecode reference?
>>
>> The way things normally work in Soot is as follows. Jimple code is
>> converted to a format calles Jasmin, which is a textual format, a
>> bytecode assembler. (you can inspect this by using "-f jasmin") Then
>> this textual format is converted to bytecode using the Jasmin
>> assembler. As far as I know there is no way to convert a single
>> expression or statement to bytecode. IMHO that would also not make
>> much sense.
>>
>> Eric
>>
>> --
>> Dr. Eric Bodden
>> Software Technology Group, Technische Universität Darmstadt, Germany
>> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
>> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>>
>>
>>
>> On 19 August 2010 16:01, Goichon Francois
>> <francois.goichon at insa-lyon.fr> wrote:
>>> Hi all,
>>>
>>> I am processing some Bytecode classes with Soot. I convert those
>>> classes to Jimple to retrieve special variables. I then have Soot
>>> Values that I need to convert back to their Bytecode reference, and I
>>> can't find a way to do so. Is there a Tag or any wrapper capable to do
>>> so ? Even for $ variables introduced by Jimple ?
>>> Regards,
>>>
>>> François
>
> --
> François Goichon
> INRIA/Amazones, CITI, INSA Lyon
> FZI Forschungszentrum Informatik, Karlsruhe
> francois.goichon at insa-lyon.fr / goichon at fzi.de
>
>
> _______________________________________________
> 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