Description of problem: Unable to step into JDK internal classes while debugging java code. Please include JDK with debugging support so it is possible to step into JDK code and inspect variables as usual. Actual results: Variable information is not available, source compiled without -g option. Value of "stack" is not known. Expected results: Full debugging support. It seems to be very difficult to trace down and report JDK related bugs in Fedora without JDK with debugging support.
We do ship the JDK with debugging info. Do you have java-1.8.0-openjdk-debuginfo installed?
I can confirm the behaviour. With the -src package installed, I can step into the classes and see the arguments and see the object itself but information about local variables is missing. I am looking for a fix.
Created attachment 945437 [details] compile java code using -g This patch forces the build to use the `-g` flag with javac. It seems to work locally (at least, I can step into HashMap.getNode(int, Object) and see the value of the local variables). I am not sure if this patch is the best approach - it diverges further from a plain upstream build. There are two possible options to consider: create a new debug flag upstream which (theoretically) doesn't alter optimizations from `release` but add all debug info in all places (in both java and native code). Or maybe patch upstream to add javac debug info on a standard OPENJDK build (like we already do with native code).
Ah, both Deepak and I assumed you meant native code... Omair, there is already such an option; DEBUG_CLASSFILES=true. If it's set and not being honoured, that's yet another regression in this new build system.
How is that option supposed to work? I have tried setting this before launching debugged java app and debugger but did not help. Or is it JDK compile time switch?
(In reply to Andrew John Hughes from comment #4) > Omair, there is already such an option; DEBUG_CLASSFILES=true. If it's set > and not being honoured, that's yet another regression in this new build > system. It's not being set in the spec file. Let me test if adding it fixes it. (In reply to Dominik Pospisil from comment #5) > Or is it JDK compile time switch? It's a compile time switch. The java-1.8.0-openjdk package will need to be updated.
DEBUG_CLASSFILES doesn't seem to work anymore :( It is still defined in a number of places but not used: $ grep -r CLASSFILES common/ make/ jdk/ hotspot/ build/ common/autoconf/jdk-options.m4: DEBUG_CLASSFILES="false" common/autoconf/jdk-options.m4: DEBUG_CLASSFILES="true" common/autoconf/jdk-options.m4: DEBUG_CLASSFILES="true" common/autoconf/jdk-options.m4: AC_SUBST(DEBUG_CLASSFILES) common/autoconf/generated-configure.sh:DEBUG_CLASSFILES common/autoconf/generated-configure.sh: DEBUG_CLASSFILES="false" common/autoconf/generated-configure.sh: DEBUG_CLASSFILES="true" common/autoconf/generated-configure.sh: DEBUG_CLASSFILES="true" common/autoconf/hotspot-spec.gmk.in:DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@ hotspot/src/share/vm/classfile/classFileStream.hpp:#ifndef SHARE_VM_CLASSFILE_CLASSFILESTREAM_HPP hotspot/src/share/vm/classfile/classFileStream.hpp:#define SHARE_VM_CLASSFILE_CLASSFILESTREAM_HPP hotspot/src/share/vm/classfile/classFileStream.hpp:#endif // SHARE_VM_CLASSFILE_CLASSFILESTREAM_HPP build/jdk8.build/config.status:S["DEBUG_CLASSFILES"]="false" Binary file build/jdk8.build/hotspot/linux_amd64_compiler2/product/precompiled.hpp.gch matches build/jdk8.build/config.log:DEBUG_CLASSFILES='false' build/jdk8.build/hotspot-spec.gmk:DEBUG_CLASSFILES:=false
I pinged upstream about this: http://mail.openjdk.java.net/pipermail/build-dev/2014-October/013397.html
This was fixed for F22: http://pkgs.fedoraproject.org/cgit/java-1.8.0-openjdk.git/commit/?id=9f31375ff638192c9bdd1a42efb8e1d6968af044 I will backport it to F20.
Fixed in java-1.8.0-openjdk-1.8.0.45-32.b13.fc20, but I am not going to push it right now. There's a security update in updates-testing and I don't want this minor bugfix to obsolete that.
java-1.8.0-openjdk-1.8.0.45-32.b13.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/java-1.8.0-openjdk-1.8.0.45-32.b13.fc20
java-1.8.0-openjdk-1.8.0.45-38.b14.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/java-1.8.0-openjdk-1.8.0.45-38.b14.fc20
Package java-1.8.0-openjdk-1.8.0.45-38.b14.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing java-1.8.0-openjdk-1.8.0.45-38.b14.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-8251/java-1.8.0-openjdk-1.8.0.45-38.b14.fc20 then log in and leave karma (feedback).
java-1.8.0-openjdk-1.8.0.45-38.b14.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.