On Tue, 14 Mar 2023 15:22:04 GMT, Adam Sotona <asot...@openjdk.org> wrote:
>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripJavaDebugAttributesPlugin.java >> line 62: >> >>> 60: // XXX. Do we have debug info? Is Asm ready for >>> module-info? >>> 61: } else { >>> 62: byte[] content = newClassReader(path, resource, >>> Classfile.Option.processDebug(false)) >> >> ASM `ClassReader.SKIP_DEBUG` flag indicates to skip the SourceFile, >> SourceDebugExtension, LocalVariableTable, LocalVariableTypeTable, >> LineNumberTable and MethodParameters attributes. >> >> `Classfile.Option.processDebug(false)` only skips LocalVariableTable, >> LocalVariableTypeTable, CHARACTER_RANGE_TABLE attributes. To implement the >> same behavior as `SKIP_DEBUG`, it needs >> `Classfile.Option.processLineNumbers(false)` and skipping other attributes. > > Right, I'll fix it, thanks. Looks like `LineNumberTable` is not stripped even with `Option.processLineNumbers(false)`. ------------- PR: https://git.openjdk.org/jdk/pull/12944