Correct overly-optimistic assumptions about C macro support by "gcc -g3".
authorEli Zaretskii <eliz@gnu.org>
Fri, 15 Nov 2013 08:18:37 +0000 (10:18 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 15 Nov 2013 08:18:37 +0000 (10:18 +0200)
 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
src/lisp.h

index 92174be..14de1e7 100644 (file)
@@ -1,3 +1,9 @@
+2013-11-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * 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  <sdl.web@gmail.com>
 
        * minibuf.c (Ftry_completion, Fall_completions)
index 3eb31ac..50b0f75 100644 (file)
@@ -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;