aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2014-05-31 16:24:45 +0300
committerEli Zaretskii2014-05-31 16:24:45 +0300
commit2bbda049fb1b5b6dbe057f7644a4ab4af0ecd142 (patch)
treeaa94278ded6e6c6584b1382a327ee35208c9da72 /src
parent3a73c34c472b121f3fb4b5cdf2961a412e3eef2d (diff)
downloademacs-2bbda049fb1b5b6dbe057f7644a4ab4af0ecd142.tar.gz
emacs-2bbda049fb1b5b6dbe057f7644a4ab4af0ecd142.zip
Revert revision 2014-05-27T17:31:17Z!eliz@gnu.org, as it breaks debugging with GCC 3.x.
Revert last changes to GDB-visible symbols. src/lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros. (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them. (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): Delete macros.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/lisp.h31
2 files changed, 12 insertions, 27 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index bbc06d09f5b..2daee8c2d97 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12014-05-31 Eli Zaretskii <eliz@gnu.org>
2
3 Revert last changes to GDB-visible symbols.
4 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
5 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
6 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
7 Delete macros.
8
12014-05-31 Glenn Morris <rgm@gnu.org> 92014-05-31 Glenn Morris <rgm@gnu.org>
2 10
3 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649) 11 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
diff --git a/src/lisp.h b/src/lisp.h
index a92d7694a3b..b483eff0846 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -36,21 +36,14 @@ INLINE_HEADER_BEGIN
36 36
37/* Define a TYPE constant ID as an externally visible name. Use like this: 37/* Define a TYPE constant ID as an externally visible name. Use like this:
38 38
39 #define ID_val (some integer preprocessor expression)
40 #if ENUMABLE (ID_val)
41 DEFINE_GDB_SYMBOL_ENUM (ID)
42 #else
43 DEFINE_GDB_SYMBOL_BEGIN (TYPE, ID) 39 DEFINE_GDB_SYMBOL_BEGIN (TYPE, ID)
44 # define ID ID_val 40 #define ID something
45 DEFINE_GDB_SYMBOL_END (ID) 41 DEFINE_GDB_SYMBOL_END (ID)
46 #endif
47 42
48 This hack is for the benefit of compilers that do not make macro 43 This hack is for the benefit of compilers that do not make macro
49 definitions visible to the debugger. It's used for symbols that 44 definitions visible to the debugger. It's used for symbols that
50 .gdbinit needs, symbols whose values may not fit in 'int' (where an 45 .gdbinit needs, symbols whose values may not fit in 'int' (where an
51 enum would suffice). */ 46 enum would suffice). */
52#define ENUMABLE(val) (INT_MIN <= (val) && (val) <= INT_MAX)
53#define DEFINE_GDB_SYMBOL_ENUM(id) enum { id = id##_val };
54#if defined MAIN_PROGRAM 47#if defined MAIN_PROGRAM
55# define DEFINE_GDB_SYMBOL_BEGIN(type, id) type const id EXTERNALLY_VISIBLE 48# define DEFINE_GDB_SYMBOL_BEGIN(type, id) type const id EXTERNALLY_VISIBLE
56# define DEFINE_GDB_SYMBOL_END(id) = id; 49# define DEFINE_GDB_SYMBOL_END(id) = id;
@@ -578,25 +571,15 @@ LISP_MACRO_DEFUN (XIL, Lisp_Object, (EMACS_INT i), (i))
578 571
579/* In the size word of a vector, this bit means the vector has been marked. */ 572/* In the size word of a vector, this bit means the vector has been marked. */
580 573
581#define ARRAY_MARK_FLAG_val PTRDIFF_MIN
582#if ENUMABLE (ARRAY_MARK_FLAG_val)
583DEFINE_GDB_SYMBOL_ENUM (ARRAY_MARK_FLAG)
584#else
585DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, ARRAY_MARK_FLAG) 574DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, ARRAY_MARK_FLAG)
586# define ARRAY_MARK_FLAG ARRAY_MARK_FLAG_val 575#define ARRAY_MARK_FLAG PTRDIFF_MIN
587DEFINE_GDB_SYMBOL_END (ARRAY_MARK_FLAG) 576DEFINE_GDB_SYMBOL_END (ARRAY_MARK_FLAG)
588#endif
589 577
590/* In the size word of a struct Lisp_Vector, this bit means it's really 578/* In the size word of a struct Lisp_Vector, this bit means it's really
591 some other vector-like object. */ 579 some other vector-like object. */
592#define PSEUDOVECTOR_FLAG_val (PTRDIFF_MAX - PTRDIFF_MAX / 2)
593#if ENUMABLE (PSEUDOVECTOR_FLAG_val)
594DEFINE_GDB_SYMBOL_ENUM (PSEUDOVECTOR_FLAG)
595#else
596DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, PSEUDOVECTOR_FLAG) 580DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, PSEUDOVECTOR_FLAG)
597# define PSEUDOVECTOR_FLAG PSEUDOVECTOR_FLAG_val 581#define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2)
598DEFINE_GDB_SYMBOL_END (PSEUDOVECTOR_FLAG) 582DEFINE_GDB_SYMBOL_END (PSEUDOVECTOR_FLAG)
599#endif
600 583
601/* In a pseudovector, the size field actually contains a word with one 584/* In a pseudovector, the size field actually contains a word with one
602 PSEUDOVECTOR_FLAG bit set, and one of the following values extracted 585 PSEUDOVECTOR_FLAG bit set, and one of the following values extracted
@@ -658,15 +641,9 @@ enum More_Lisp_Bits
658 XCONS (tem) is the struct Lisp_Cons * pointing to the memory for 641 XCONS (tem) is the struct Lisp_Cons * pointing to the memory for
659 that cons. */ 642 that cons. */
660 643
661/* Mask for the value (as opposed to the type bits) of a Lisp object. */
662#define VALMASK_val (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX)
663#if ENUMABLE (VALMASK_val)
664DEFINE_GDB_SYMBOL_ENUM (VALMASK)
665#else
666DEFINE_GDB_SYMBOL_BEGIN (EMACS_INT, VALMASK) 644DEFINE_GDB_SYMBOL_BEGIN (EMACS_INT, VALMASK)
667# define VALMASK VALMASK_val 645#define VALMASK (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX)
668DEFINE_GDB_SYMBOL_END (VALMASK) 646DEFINE_GDB_SYMBOL_END (VALMASK)
669#endif
670 647
671/* Largest and smallest representable fixnum values. These are the C 648/* Largest and smallest representable fixnum values. These are the C
672 values. They are macros for use in static initializers. */ 649 values. They are macros for use in static initializers. */