[8u] RFR: 8262864: No debug symbols in image for Windows --with-native-debug-symbols=external
Severin Gehwolf
sgehwolf at redhat.com
Wed Mar 10 13:58:54 UTC 2021
Hi Andrew,
On Wed, 2021-03-10 at 10:45 +0000, Andrew Leonard wrote:
> The minor issue on Linux platforms was that it also did not remove
> the non-jre jdk/jre/bin debug files correctly, it removed them "only"
> from the JRE_BIN_LIST and not the JDKJRE_BIN_LIST, so we had
> debuginfo files in jdk/jre/bin for executeable files that were not
> there, eg.javap.debuginfo, but there is no javap executable in
> jdk/jre/bin.
Thanks for the explanation. Makes sense.
> The section I removed did not achieve maybe what it was intending,
> i'm actually not sure what it was intending! but the section was
> filtering out from ALL_BIN_LIST all *.pdb debug files, ie.removing
> ALL external debug symbols, hence the problem.. It was also removing
> *.debuginfo and *.diz files for all .exe files in bin "except" for
> java.exe. So the "essence" of what it was trying to do was always
> remove every type of debug file (.diz,.debuginfo,.pdb) except for
> java.exe. Which didn't make sense, as per the Linux section that was
> removed in the previous PR.
> The issue Simon is referring to I think is at the source of the .pdb
> generation for java.exe/dll (probably in
> make/common/NativeCompilation.gmk), since they have the same basename
> one is going to overwrite the other...this behavior is separate to
> this Image creation copy rules. I've raised a new issue to cover
> that: https://bugs.openjdk.java.net/browse/JDK-8263356
Thanks, this clarifies things. Yes, what you say makes sense. Consider
your patch reviewed. Feel free to flag for approval.
Thanks,
Severin
> What do you think?
> Thanks
>
> On Wed, Mar 10, 2021 at 10:15 AM Severin Gehwolf
> <sgehwolf at redhat.com> wrote:
> > Hi Andrew,
> >
> > On Tue, 2021-03-02 at 18:50 +0000, Andrew Leonard wrote:
> > > Hi,
> > > Please can I get reviews for this patch to fix the creation of
> > jdk8u
> > > Windows debug files (.map, .pdb) when using
> > > --with-native-debug-symbols=external. A recent fix resolved this
> > for
> > > non-Windows (https://bugs.openjdk.java.net/browse/JDK-8252395),
> > this fixes
> > > Windows and also a minor issue with the other platforms that
> > > JDK-8252395 didn't quite fix.
> >
> > Can you be more specific what this "minor issue" is that you fixed
> > here?
> >
> > > webrev: https://cr.openjdk.java.net/~aleonard/8262864/webrev.00/
> >
> > -ifeq ($(OPENJDK_TARGET_OS), windows)
> > - # On windows, the libraries are in the bin dir, only filter out
> > debuginfo files
> > - # for executables. "java" is both a library and executable.
> > - ALL_BIN_EXEC_FILES := $(filter-out java.exe, $(notdir $(filter
> > %.exe, $(ALL_BIN_LIST))))
> > - ALL_BIN_DEBUG_FILTER := $(addprefix %, $(patsubst %.exe,
> > %.debuginfo, $(ALL_BIN_EXEC_FILES)) \
> > - $(patsubst %.exe, %.diz, $(ALL_BIN_EXEC_FILES))) %.pdb
> > - ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER),
> > $(ALL_BIN_LIST))
> > -endif
> >
> > If I understand Simon correctly then by removing these bits it
> > doesn't
> > change the fact that debuginfo for only one of the files, java.exe
> > OR
> > java.dll, end up in the image. In his case it seemed to be
> > debuginfo
> > for java.dll, but I wonder how predictable is? Isn't that a reason
> > to
> > keep this part of the patch as it makes it more explicit that we
> > prefer
> > debuginfo for java.dll over java.exe as we cannot have both.
> >
> > Thoughts?
> >
> > Thanks,
> > Severin
> >
More information about the jdk8u-dev
mailing list