[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Line number attributes
On Thu, Oct 09, 2003 at 10:56:24AM -0700, Archie Cobbs wrote:
> Hi,
>
> My apologies if this has been covered in the list already, I'm just
> now upgrading from Soot version 1.x to version 2.0.1..
>
> In 1.x I used to do this to preserve the line number attributes when
> processing class files:
>
> import soot.baf.toolkits.base.CodeAttributeGenerator;
> import soot.tagkit.LineNumberTagAggregator;
>
> ...
>
> static {
> soot.Main.keepLineNumberAttribute = true;
> //soot.Main.keepBytecodeOffsetInfo = true;
> CodeAttributeGenerator.v().registerAggregator(
> new LineNumberTagAggregator(true));
> }
>
> What would be the equivalent statemtent(s) in 2.x?
soot.options.Options.v().set_keep_line_number( true );
soot.options.Options.v().set_keep_offset( true );
soot.PhaseOptions.v().setPhaseOption( "tag.ln", "on" );
Ondrej
>
> Thanks,
> -Archie
>
> __________________________________________________________________________
> Archie Cobbs * Halloo Communications * http://www.halloo.com