comparison src/emacs.c @ 111688:7153f8068e69

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.
author Dan Nicolaescu <dann@ics.uci.edu>
date Tue, 23 Nov 2010 10:47:23 -0800
parents 72b4312028a2
children 5284aa9ea62d
comparison
equal deleted inserted replaced
111687:17d793ffe36f 111688:7153f8068e69
98 static const char emacs_version[] = "24.0.50"; 98 static const char emacs_version[] = "24.0.50";
99 99
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;
127 127
128 /* The name under which Emacs was invoked, with any leading directory 128 /* The name under which Emacs was invoked, with any leading directory