From: Paul Eggert Date: Fri, 15 Nov 2013 01:59:57 +0000 (-0800) Subject: * configure.ac (DEBUGGER_SEES_C_MACROS): New macro. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~822 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1a191e5c73cdae3d3b34f5fc3501bfd2ddf50ec8;p=emacs.git * configure.ac (DEBUGGER_SEES_C_MACROS): New macro. * src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): Define to empty if DEBUGGER_SEES_C_MACROS is defined. This avoids placing unnecessary constants into the Emacs code. --- diff --git a/ChangeLog b/ChangeLog index 95c10ec22a6..506fa045864 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-11-15 Paul Eggert + + * configure.ac (DEBUGGER_SEES_C_MACROS): New macro. + 2013-11-14 Paul Eggert Simplify, port and tune bool vector implementation. diff --git a/configure.ac b/configure.ac index a9baf608bf3..9c66a7d2d85 100644 --- a/configure.ac +++ b/configure.ac @@ -697,6 +697,16 @@ if test "$ac_test_CFLAGS" != set; then esac fi +for flag in $CFLAGS -; do + case $flag in + -g*3) + AC_DEFINE([DEBUGGER_SEES_C_MACROS], 1, + [Define to 1 if C macros are visible to the debugger, as with + GCC's -g3 option.]) + break;; + esac +done + AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings], [turn on lots of GCC warnings/errors. This is intended for diff --git a/src/ChangeLog b/src/ChangeLog index fb262a6efb0..8131c7b7355 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-11-15 Paul Eggert + + * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): + Define to empty if DEBUGGER_SEES_C_MACROS is defined. + This avoids placing unnecessary constants into the Emacs code. + 2013-11-14 Kazuhiro Ito (tiny change) * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible diff --git a/src/lisp.h b/src/lisp.h index 72e5dad8ca3..3eb31ac34be 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -45,7 +45,7 @@ INLINE_HEADER_BEGIN definitions visible to the debugger. It's used for symbols that .gdbinit needs, symbols whose values may not fit in 'int' (where an enum would suffice). */ -#ifdef MAIN_PROGRAM +#if defined MAIN_PROGRAM && !defined DEBUGGER_SEES_C_MACROS # define DEFINE_GDB_SYMBOL_BEGIN(type, id) type const id EXTERNALLY_VISIBLE # define DEFINE_GDB_SYMBOL_END(id) = id; #else