[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regarding line-number in soot mailing thread



On Sun, Feb 08, 2004 at 09:31:56PM +0800, #HUANG YUE# wrote:
>    I `d like to show original source code line number in control flow graph. I
> know from mailing list that there is an attribute that can help to realize.
> 
>  
> 
>    But after I wrote the codes as shown in list, I found that no tags found in
> the units. I am not sure which part is not correct. Hope you could give me some
> help on this case.

You need two things to get the source code line numbers:

1) When you compile the code you will be analyzing, you need to use the
-g switch to javac. Otherwise, javac does not insert source line
information into the bytecode, so Soot does not find it there.

2) You need to give the -keep-line-number command-line switch to Soot.
Otherwise, by default, it throws away the source line numbers to save
memory.

Hope that helps.

Ondrej