From 73583a99782d58134e75a81ba0ca2dc8a9bcf37b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 15 Nov 2013 10:18:37 +0200 Subject: [PATCH] Correct overly-optimistic assumptions about C macro support by "gcc -g3". src/lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically assume C macros are not supported even under -g3 in these old GCC versions. --- src/ChangeLog | 6 ++++++ src/lisp.h | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 92174beb27b..14de1e793b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-11-15 Eli Zaretskii + + * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically + assume C macros are not supported even under -g3 in these old GCC + versions. + 2013-11-15 Leo Liu * minibuf.c (Ftry_completion, Fall_completions) diff --git a/src/lisp.h b/src/lisp.h index 3eb31ac34be..50b0f75c471 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -45,6 +45,13 @@ 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). */ +#if defined DEBUGGER_SEES_C_MACROS && defined __GNUC__ +/* GCC versions before 3.5 have unreliable support for C macros in + debug info. */ +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 5) +# undef DEBUGGER_SEES_C_MACROS +# endif +#endif #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; -- 2.39.2