diff options
| author | Dan Nicolaescu | 2010-11-23 10:47:23 -0800 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-11-23 10:47:23 -0800 |
| commit | 42c8bc9b87388258d1de6a714b051330570f0ff4 (patch) | |
| tree | 3da9eae14b91e4c2d469b1cfe122c607f4f78d65 /src | |
| parent | 2e8a479790905675fea870ac73f1deebd6889eea (diff) | |
| download | emacs-42c8bc9b87388258d1de6a714b051330570f0ff4.tar.gz emacs-42c8bc9b87388258d1de6a714b051330570f0ff4.zip | |
Mark debugger related variables and functions as EXTERNALLY_VISIBLE
so that they do not get optimized away.
* configure.in (EXTERNALLY_VISIBLE): New definition.
* src/emacs.c (gdb_use_union, gdb_valbits,gdb_gctypebits)
(gdb_data_seg_bits, gdb_array_mark_flag, PVEC_FLAG)
(gdb_pvec_type):
* src/print.c (print_output_debug_flag):
* src/lisp.h (debug_print): Mark as EXTERNALLY_VISIBLE.
(safe_debug_print): New declaration.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/config.in | 6 | ||||
| -rw-r--r-- | src/emacs.c | 22 | ||||
| -rw-r--r-- | src/lisp.h | 3 | ||||
| -rw-r--r-- | src/print.c | 2 |
5 files changed, 27 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 75a141dabc6..d8518e5cdda 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2010-11-23 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2010-11-23 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * emacs.c (gdb_use_union, gdb_valbits,gdb_gctypebits) | ||
| 4 | (gdb_data_seg_bits, gdb_array_mark_flag, PVEC_FLAG) | ||
| 5 | (gdb_pvec_type): | ||
| 6 | * print.c (print_output_debug_flag): | ||
| 7 | * lisp.h (debug_print): Mark as EXTERNALLY_VISIBLE. | ||
| 8 | (safe_debug_print): New declaration. | ||
| 9 | |||
| 3 | * xterm.c: | 10 | * xterm.c: |
| 4 | * systty.h: | 11 | * systty.h: |
| 5 | * sound.c: Include <sys/ioctl.h> unconditionally. | 12 | * sound.c: Include <sys/ioctl.h> unconditionally. |
diff --git a/src/config.in b/src/config.in index b9e9d7c720d..487009b4511 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -1197,6 +1197,12 @@ typedef unsigned size_t; | |||
| 1197 | #define NO_INLINE | 1197 | #define NO_INLINE |
| 1198 | #endif | 1198 | #endif |
| 1199 | 1199 | ||
| 1200 | #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) | ||
| 1201 | #define EXTERNALLY_VISIBLE __attribute__((externally_visible)) | ||
| 1202 | #else | ||
| 1203 | #define EXTERNALLY_VISIBLE | ||
| 1204 | #endif | ||
| 1205 | |||
| 1200 | /* Some versions of GNU/Linux define noinline in their headers. */ | 1206 | /* Some versions of GNU/Linux define noinline in their headers. */ |
| 1201 | #ifdef noinline | 1207 | #ifdef noinline |
| 1202 | #undef noinline | 1208 | #undef noinline |
diff --git a/src/emacs.c b/src/emacs.c index 0d3b37ae27c..49716c7eb4a 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -100,27 +100,27 @@ static const char emacs_version[] = "24.0.50"; | |||
| 100 | /* Make these values available in GDB, which doesn't see macros. */ | 100 | /* Make these values available in GDB, which doesn't see macros. */ |
| 101 | 101 | ||
| 102 | #ifdef USE_LSB_TAG | 102 | #ifdef USE_LSB_TAG |
| 103 | int gdb_use_lsb = 1; | 103 | int gdb_use_lsb EXTERNALLY_VISIBLE = 1; |
| 104 | #else | 104 | #else |
| 105 | int gdb_use_lsb = 0; | 105 | int gdb_use_lsb EXTERNALLY_VISIBLE = 0; |
| 106 | #endif | 106 | #endif |
| 107 | #ifndef USE_LISP_UNION_TYPE | 107 | #ifndef USE_LISP_UNION_TYPE |
| 108 | int gdb_use_union = 0; | 108 | int gdb_use_union EXTERNALLY_VISIBLE = 0; |
| 109 | #else | 109 | #else |
| 110 | int gdb_use_union = 1; | 110 | int gdb_use_union EXTERNALLY_VISIBLE = 1; |
| 111 | #endif | 111 | #endif |
| 112 | EMACS_INT gdb_valbits = VALBITS; | 112 | EMACS_INT gdb_valbits EXTERNALLY_VISIBLE = VALBITS; |
| 113 | EMACS_INT gdb_gctypebits = GCTYPEBITS; | 113 | EMACS_INT gdb_gctypebits EXTERNALLY_VISIBLE = GCTYPEBITS; |
| 114 | #if defined (DATA_SEG_BITS) && ! defined (USE_LSB_TAG) | 114 | #if defined (DATA_SEG_BITS) && ! defined (USE_LSB_TAG) |
| 115 | EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS; | 115 | EMACS_INT gdb_data_seg_bits EXTERNALLY_VISIBLE = DATA_SEG_BITS; |
| 116 | #else | 116 | #else |
| 117 | EMACS_INT gdb_data_seg_bits = 0; | 117 | EMACS_INT gdb_data_seg_bits EXTERNALLY_VISIBLE = 0; |
| 118 | #endif | 118 | #endif |
| 119 | EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG; | 119 | EMACS_INT PVEC_FLAG EXTERNALLY_VISIBLE = PSEUDOVECTOR_FLAG; |
| 120 | EMACS_INT gdb_array_mark_flag = ARRAY_MARK_FLAG; | 120 | EMACS_INT gdb_array_mark_flag EXTERNALLY_VISIBLE = ARRAY_MARK_FLAG; |
| 121 | /* GDB might say "No enum type named pvec_type" if we don't have at | 121 | /* GDB might say "No enum type named pvec_type" if we don't have at |
| 122 | least one symbol with that type, and then xbacktrace could fail. */ | 122 | least one symbol with that type, and then xbacktrace could fail. */ |
| 123 | enum pvec_type gdb_pvec_type = PVEC_TYPE_MASK; | 123 | enum pvec_type gdb_pvec_type EXTERNALLY_VISIBLE = PVEC_TYPE_MASK; |
| 124 | 124 | ||
| 125 | /* Command line args from shell, as list of strings. */ | 125 | /* Command line args from shell, as list of strings. */ |
| 126 | Lisp_Object Vcommand_line_args; | 126 | Lisp_Object Vcommand_line_args; |
diff --git a/src/lisp.h b/src/lisp.h index 117e810e565..623ba5382eb 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2832,7 +2832,8 @@ extern void syms_of_chartab (void); | |||
| 2832 | /* Defined in print.c */ | 2832 | /* Defined in print.c */ |
| 2833 | extern Lisp_Object Vprin1_to_string_buffer; | 2833 | extern Lisp_Object Vprin1_to_string_buffer; |
| 2834 | extern Lisp_Object Vprint_level, Vprint_length; | 2834 | extern Lisp_Object Vprint_level, Vprint_length; |
| 2835 | extern void debug_print (Lisp_Object); | 2835 | extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE; |
| 2836 | extern void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE; | ||
| 2836 | EXFUN (Fprin1, 2); | 2837 | EXFUN (Fprin1, 2); |
| 2837 | EXFUN (Fprin1_to_string, 2); | 2838 | EXFUN (Fprin1_to_string, 2); |
| 2838 | EXFUN (Fprinc, 2); | 2839 | EXFUN (Fprinc, 2); |
diff --git a/src/print.c b/src/print.c index ea88ba72f65..a95498ae668 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -163,7 +163,7 @@ Lisp_Object Vprint_number_table; | |||
| 163 | void print_interval (INTERVAL interval, Lisp_Object printcharfun); | 163 | void print_interval (INTERVAL interval, Lisp_Object printcharfun); |
| 164 | 164 | ||
| 165 | /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ | 165 | /* GDB resets this to zero on W32 to disable OutputDebugString calls. */ |
| 166 | int print_output_debug_flag = 1; | 166 | int print_output_debug_flag EXTERNALLY_VISIBLE = 1; |
| 167 | 167 | ||
| 168 | 168 | ||
| 169 | /* Low level output routines for characters and strings */ | 169 | /* Low level output routines for characters and strings */ |