Debug information

Andrew Haley aph at
Tue Mar 17 14:18:35 UTC 2009

In GNU/Linux/BSD/etc systems we normally want to be able to debug
installed packages.  So, in many distributions there is a rule that
all packages must be built with full debug information.  This isn't
quite as bloated as it might sound, as we extract all such debug
information files and put it into separate debug packages.  So, when
someone has a problem that we need to debug we can download the debug
package to their computer and attach a debugger without needing to
recompile anything.

As far as I've been able to determine there is no simple way to turn
on debug information in OpenJDK builds.  So, in IcedTea we have a
number of patches that turn on debugging in various makefiles and
build.xml files, but of course we miss things.  I recently tried to
debug javac but discovered that it wasn't possible because it hadn't
been compiled with full debug info:

        <javac srcdir="${src.classes}" destdir="${build.bootclasses}"
            source="${compiler.source.level}"  debug="true" debuglevel="source,lines"

Note that there's no way to override the debuglevel without editing

I think we need a single overriding option when building OpenJDK that
enables debug information everywhere, no matter what the build target.
Note that I'm not talking here about any of OpenJDK's internal
debugging aids, just the -g options passed to javac and the various C
and C++ compilers.

While I could write this as an IcedTea patch, I believe that it's
something that should go into OpenJDK proper.  Would that be


More information about the build-dev mailing list