From eed072beb4f6402c17f33c0671fd2da43bc39b44 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 18 Aug 2011 19:16:25 -0400 Subject: [PATCH] Bug 680277 - Debug builds should always be compiled with frame pointers; r=khuey --- configure.in | 10 ++++++++-- js/src/configure.in | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index b0888fd67fe..49959d9a08a 100644 --- a/configure.in +++ b/configure.in @@ -2107,6 +2107,8 @@ case "$target" in # logging code in nsObjCExceptions.h. Currently we only use that in debug # builds. MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling" + # Debug builds should always have frame pointers + MOZ_DEBUG_FLAGS="-g -fno-omit-frame-pointer" if test "x$lto_is_enabled" = "xyes"; then echo "Skipping -dead_strip because lto is enabled." @@ -2253,6 +2255,8 @@ ia64*-hpux*) else MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions -fno-omit-frame-pointer" fi + # Debug builds should always have frame pointers + MOZ_DEBUG_FLAGS="-g -fno-omit-frame-pointer" ;; *-*linux*) @@ -2278,7 +2282,8 @@ ia64*-hpux*) fi MOZ_PGO_OPTIMIZE_FLAGS="-O3 $MOZ_FRAMEPTR_FLAGS" MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK $MOZ_FRAMEPTR_FLAGS" - MOZ_DEBUG_FLAGS="-g" + # Debug builds should always have frame pointers + MOZ_DEBUG_FLAGS="-g -fno-omit-frame-pointer" fi TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' @@ -2371,7 +2376,8 @@ ia64*-hpux*) CFLAGS="$CFLAGS -we4553" CXXFLAGS="$CXXFLAGS -we4553" LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" - MOZ_DEBUG_FLAGS='-Zi' + # Debug builds should always have frame pointers + MOZ_DEBUG_FLAGS='-Zi -Oy-' MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' WARNINGS_AS_ERRORS='-WX' # If we're building with --enable-profiling, we need -Oy-, which forces a frame pointer. diff --git a/js/src/configure.in b/js/src/configure.in index 5669fbb016b..dad130cfa41 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -2012,6 +2012,8 @@ case "$target" in # logging code in nsObjCExceptions.h. Currently we only use that in debug # builds. MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling" + # Debug builds should always have frame pointers + MOZ_DEBUG_FLAGS="-g -fno-omit-frame-pointer" if test "x$lto_is_enabled" = "xyes"; then echo "Skipping -dead_strip because lto is enabled." @@ -2160,6 +2162,8 @@ ia64*-hpux*) fi # The Maemo builders don't know about this flag MOZ_ARM_VFP_FLAGS="-mfpu=vfp" + # Debug builds should always have frame pointers + MOZ_DEBUG_FLAGS="-g -fno-omit-frame-pointer" ;; *-*linux*) @@ -2185,7 +2189,8 @@ ia64*-hpux*) fi MOZ_PGO_OPTIMIZE_FLAGS="-O3 $MOZ_FRAMEPTR_FLAGS" MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK $MOZ_FRAMEPTR_FLAGS" - MOZ_DEBUG_FLAGS="-g" + # Debug builds should always have frame pointers + MOZ_DEBUG_FLAGS="-g -fno-omit-frame-pointer" fi TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"' @@ -2301,7 +2306,8 @@ ia64*-hpux*) CFLAGS="$CFLAGS -we4553" CXXFLAGS="$CXXFLAGS -we4553" LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib" - MOZ_DEBUG_FLAGS='-Zi' + # Debug builds should always have frame pointers + MOZ_DEBUG_FLAGS='-Zi -Oy-' MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV' WARNINGS_AS_ERRORS='-WX' # If we're building with --enable-profiling, we need -Oy-, which forces a frame pointer.