diff options
| author | Paul Eggert | 2012-07-26 11:35:50 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-07-26 11:35:50 -0700 |
| commit | 5eceb8fb134263b05608532afb33fdf43c1e3713 (patch) | |
| tree | 45086aac676975ccd028122a2379095e1c885173 /src/alloc.c | |
| parent | f8b91036c9ce5e524ca3d21badee83a3c6794941 (diff) | |
| download | emacs-5eceb8fb134263b05608532afb33fdf43c1e3713.tar.gz emacs-5eceb8fb134263b05608532afb33fdf43c1e3713.zip | |
Fix export of symbols to GDB.
* alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
emacs.c, as this is a more-suitable home. Had this been done earlier
the fix for 1995-05-30T23:07:27Z!kwzh@gnu.org would have avoided some of the problems noted in
<http://bugs.gnu.org/1995-05-30T23:07:27Z!kwzh@gnu.org#13> by Eli Zaretskii, as the scope problems
would have been more obvious.
* emacs.c (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
(gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
Remove; now done in lisp.h.
* lisp.h (PUBLISH_TO_GDB): New macro.
(GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
(DATA_SEG_BITS): Use it.
(GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
* mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
not be usable in #if. This simplifies things.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index d9c56b5c7c8..ac6cb861c4d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -6875,3 +6875,29 @@ The time is in seconds as a floating point value. */); | |||
| 6875 | defsubr (&Sgc_status); | 6875 | defsubr (&Sgc_status); |
| 6876 | #endif | 6876 | #endif |
| 6877 | } | 6877 | } |
| 6878 | |||
| 6879 | /* Make some symbols visible to GDB. These cannot be done as enums, like | ||
| 6880 | GCTYPEBITS or USE_LSB_TAG, since values might not be in 'int' range. | ||
| 6881 | Each symbol X has a corresponding X_VAL symbol, verified to have | ||
| 6882 | the correct value. | ||
| 6883 | |||
| 6884 | This is last, so that the #undef lines don't mess up later code. */ | ||
| 6885 | |||
| 6886 | #define ARRAY_MARK_FLAG_VAL PTRDIFF_MIN | ||
| 6887 | #define PSEUDOVECTOR_FLAG_VAL (PTRDIFF_MAX - PTRDIFF_MAX / 2) | ||
| 6888 | #define VALMASK_VAL (USE_LSB_TAG ? -1 << GCTYPEBITS : VAL_MAX) | ||
| 6889 | |||
| 6890 | verify (ARRAY_MARK_FLAG_VAL == ARRAY_MARK_FLAG); | ||
| 6891 | verify (PSEUDOVECTOR_FLAG_VAL == PSEUDOVECTOR_FLAG); | ||
| 6892 | verify (VALMASK_VAL == VALMASK); | ||
| 6893 | |||
| 6894 | #undef ARRAY_MARK_FLAG | ||
| 6895 | #undef PSEUDOVECTOR_FLAG | ||
| 6896 | #undef VALMASK | ||
| 6897 | |||
| 6898 | ptrdiff_t const EXTERNALLY_VISIBLE | ||
| 6899 | ARRAY_MARK_FLAG = ARRAY_MARK_FLAG_VAL, | ||
| 6900 | PSEUDOVECTOR_FLAG = PSEUDOVECTOR_FLAG_VAL; | ||
| 6901 | |||
| 6902 | EMACS_INT const EXTERNALLY_VISIBLE | ||
| 6903 | VALMASK = VALMASK_VAL; | ||