diff 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
line wrap: on
line diff
--- a/src/emacs.c	Tue Nov 23 10:09:55 2010 -0800
+++ b/src/emacs.c	Tue Nov 23 10:47:23 2010 -0800
@@ -100,27 +100,27 @@
 /* Make these values available in GDB, which doesn't see macros.  */
 
 #ifdef USE_LSB_TAG
-int gdb_use_lsb = 1;
+int gdb_use_lsb EXTERNALLY_VISIBLE = 1;
 #else
-int gdb_use_lsb = 0;
+int gdb_use_lsb EXTERNALLY_VISIBLE = 0;
 #endif
 #ifndef USE_LISP_UNION_TYPE
-int gdb_use_union = 0;
+int gdb_use_union EXTERNALLY_VISIBLE  = 0;
 #else
-int gdb_use_union = 1;
+int gdb_use_union EXTERNALLY_VISIBLE = 1;
 #endif
-EMACS_INT gdb_valbits = VALBITS;
-EMACS_INT gdb_gctypebits = GCTYPEBITS;
+EMACS_INT gdb_valbits EXTERNALLY_VISIBLE = VALBITS;
+EMACS_INT gdb_gctypebits EXTERNALLY_VISIBLE = GCTYPEBITS;
 #if defined (DATA_SEG_BITS) && ! defined (USE_LSB_TAG)
-EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS;
+EMACS_INT gdb_data_seg_bits EXTERNALLY_VISIBLE = DATA_SEG_BITS;
 #else
-EMACS_INT gdb_data_seg_bits = 0;
+EMACS_INT gdb_data_seg_bits EXTERNALLY_VISIBLE = 0;
 #endif
-EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG;
-EMACS_INT gdb_array_mark_flag = ARRAY_MARK_FLAG;
+EMACS_INT PVEC_FLAG EXTERNALLY_VISIBLE = PSEUDOVECTOR_FLAG;
+EMACS_INT gdb_array_mark_flag EXTERNALLY_VISIBLE = ARRAY_MARK_FLAG;
 /* GDB might say "No enum type named pvec_type" if we don't have at
    least one symbol with that type, and then xbacktrace could fail.  */
-enum pvec_type gdb_pvec_type = PVEC_TYPE_MASK;
+enum pvec_type gdb_pvec_type EXTERNALLY_VISIBLE = PVEC_TYPE_MASK;
 
 /* Command line args from shell, as list of strings.  */
 Lisp_Object Vcommand_line_args;