[Soot-list] Does soot preserve java bytecode offset information?

Jan Peter Stotz jan-peter.stotz at sit.fraunhofer.de
Sat Feb 9 11:47:16 EST 2019


Hi Shuyang,

source line numbers are usually converted to tags, in detail to
instances of soot.tagkit.SourceLineNumberTag. You will find those tags 
if you use the command-line option -keep-line-number.

You can retrieve the line number tags when calling on a unit getTags() 
and filter them for SourceLineNumberTag instances.

Jan

Am 08.02.2019 um 21:50 schrieb Shuyang Liu:
> Recently my research requires me to find more detailed information on
> call graphs of java programs. More specifically, in addition to
> knowing which methods calls which methods (as shown by the call graph
> provided by soot), I would like to know the java bytecode offset of
> each call site so that I can distinguish some of the edges in the
> call graph. It seems to me that soot does all of its analysis after
> translates java bytecode to its IR jimple and it is not one to one
> mapping to the original java bytecode instructions. So I wonder if
> soot preserve any java bytecode offset information at all? If so, how
> can I access them? I was not able to find anything looking at the
> soot source code but I could miss something.


More information about the Soot-list mailing list