Skip to content

Commit b746609

Browse files
committed
allow disabling line numbers and bytecode offsets in dexpler
1 parent eb6d79d commit b746609

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/soot/dexpler/instructions/DexlibAbstractInstruction.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import soot.Type;
4141
import soot.Unit;
4242
import soot.dexpler.DexBody;
43+
import soot.options.Options;
4344
import soot.tagkit.BytecodeOffsetTag;
4445
import soot.tagkit.Host;
4546
import soot.tagkit.LineNumberTag;
@@ -158,11 +159,12 @@ public void setLineNumber(int lineNumber) {
158159
* the host to tag
159160
*/
160161
protected void addTags(Host host) {
161-
if (lineNumber != -1) {
162+
if (Options.v().keep_line_number() && lineNumber != -1) {
162163
host.addTag(new LineNumberTag(lineNumber));
163164
host.addTag(new SourceLineNumberTag(lineNumber));
164165
}
165-
host.addTag(new BytecodeOffsetTag(codeAddress));
166+
if (Options.v().keep_offset())
167+
host.addTag(new BytecodeOffsetTag(codeAddress));
166168
}
167169

168170
// /**

0 commit comments

Comments
 (0)