Bug 100028 - Debug information is incomplete or missing
Kelly O'Hair
Kelly.Ohair at Sun.COM
Fri Mar 27 18:15:28 UTC 2009
Seems ok to me, just a few observations:
Do we need this:
ifeq ($(DEBUG_CLASSFILES), true)
ANT_OPTIONS += -Djavac.debug=true
ANT_OPTIONS += -Djavac.debuglevel=source,lines,vars
endif
to be
ifeq ($(DEBUG_CLASSFILES), true)
ANT_OPTIONS += -Djavac.debug=true
ANT_OPTIONS += -Djavac.debuglevel=source,lines,vars
else
ANT_OPTIONS += -Djavac.debug=false
ANT_OPTIONS += -Djavac.debuglevel=
endif
Not sure what happens in ant if a property is not set but used???.
On this:
# DEBUG_BINARIES overrides everything
ifeq ($(DEBUG_BINARIES), true)
CFLAGS_REQUIRED += -g
DEBUG_FLAG = -g
endif
I think the idea with isolating the -g to a variable was to allow for
needing to globally set it to -gstabs or -g1 or some custom debug form for
everyone. e.g. being able to do a top level 'make DEBUG_BINARIES=true DEBUG_FLAG=-g1'.
So how about:
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
DEBUG_FLAG = -g
CFLAGS_REQUIRED += $(DEBUG_FLAG)
endif
Otherwise it seems fine.
If you have patch files for each repository (hg diff > patch) I can
run them through our test build system JPRT for you, and send you
the results.
-kto
Andrew Haley wrote:
> This is my first stab at moving patches from IcedTea into OpenJDK.
>
> Rather than creating a single overriding variable that enables debuginfo
> everywhere I've used two, one for native files and one for class files.
> Setting DEBUG_CLASSFILES=true in the toplevel forces all classes to be built
> with full debuginfo, and DEBUG_BINARIES does the same for native binaries.
> These make variables are entirely independent of the debug and optimization
> setting. This allows GNU/Linux distributions to build OpenJDK in a form
> fit for distribution without patching makefiles or Ant buildfiles. It also
> means that the Ant variables javac.debug and javac.debuginfo are respected
> everwhere in the build.
>
> https://bugs.openjdk.java.net/show_bug.cgi?id=100028
>
> Is this OK?
>
> Andrew.
>
>
>
More information about the build-dev
mailing list