changeset 1205:9ad7e6462145

6829575: 100028: Debug information is incomplete or missing Summary: Enable debugging in many places Reviewed-by: ohair Contributed-by: Andrew Haley <aph@redhat.com>
author aph
date Fri, 17 Apr 2009 15:56:20 +0100
parents 7fd3bc37afe3
children 5ceb9eb621d1 6ca1c622dd6e
files make/common/Defs-linux.gmk make/sun/awt/mawt.gmk
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs-linux.gmk	Thu Apr 16 19:10:32 2009 -0700
+++ b/make/common/Defs-linux.gmk	Fri Apr 17 15:56:20 2009 +0100
@@ -165,6 +165,12 @@
   endif
 endif
 
+# DEBUG_BINARIES overrides everything, use full -g debug information
+ifeq ($(DEBUG_BINARIES), true)
+  DEBUG_FLAG = -g
+  CFLAGS_REQUIRED += $(DEBUG_FLAG)
+endif
+
 CFLAGS_OPT      = $(CC_OPT)
 CFLAGS_DBG      = $(DEBUG_FLAG)
 CFLAGS_COMMON += $(CFLAGS_REQUIRED)
@@ -240,8 +246,11 @@
 #
 ifeq ($(VARIANT), OPT)
   ifneq ($(NO_STRIP), true)
-    # Debug 'strip -g' leaves local function Elf symbols (better stack traces)
-    POST_STRIP_PROCESS = $(STRIP) -g
+    ifneq ($(DEBUG_BINARIES), true)
+      # Debug 'strip -g' leaves local function Elf symbols (better stack
+      # traces)
+      POST_STRIP_PROCESS = $(STRIP) -g
+    endif
   endif
 endif
 
--- a/make/sun/awt/mawt.gmk	Thu Apr 16 19:10:32 2009 -0700
+++ b/make/sun/awt/mawt.gmk	Fri Apr 17 15:56:20 2009 +0100
@@ -108,7 +108,9 @@
 #
 
 
-#CFLAGS += -g
+ifeq ($(DEBUG_BINARIES), true)
+  CFLAGS += -g
+endif
 ifeq ($(HEADLESS),true)
 CFLAGS += -DHEADLESS=$(HEADLESS)
 CPPFLAGS += -DHEADLESS=$(HEADLESS)