-# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000, 01, 2004
+# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000, 01, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
# However, C-z works just as well in that case.
handle 2 noprint pass
+# Make it work like SIGINT normally does.
+handle SIGTSTP nopass
+
# Don't pass SIGALRM to Emacs. This makes problems when
# debugging.
handle SIGALRM ignore
# Print out s-expressions
define pp
set $tmp = $arg0
- set debug_print ($tmp)
+ set safe_debug_print ($tmp)
end
document pp
Print the argument as an emacs s-expression
set $tmp = $arg0
echo $arg0
printf " = "
- set debug_print ($tmp)
+ set safe_debug_print ($tmp)
end
document pp1
Print the argument as an emacs s-expression
be recorded in the GUD buffer.
end
+# Print value of lisp variable
+define pv
+ set $tmp = "$arg0"
+ set safe_debug_print ( find_symbol_value (intern ($tmp)))
+end
+document pv
+Print the value of the lisp variable given as argument.
+Works only when an inferior emacs is executing.
+end
+
+# Print value of lisp variable
+define pv1
+ set $tmp = "$arg0"
+ echo $arg0
+ printf " = "
+ set safe_debug_print (find_symbol_value (intern ($tmp)))
+end
+document pv1
+Print the value of the lisp variable given as argument.
+Works only when an inferior emacs is executing.
+For use on tool bar when debugging in Emacs
+where the variable name would not otherwise
+be recorded in the GUD buffer.
+end
+
# Print out current buffer point and boundaries
define ppt
set $b = current_buffer
printf " HL"
end
if ($it->n_overlay_strings > 0)
- printf " nov=%d"
+ printf " nov=%d", $it->n_overlay_strings
end
if ($it->sp != 0)
printf " sp=%d", $it->sp
end
define nextcons
- p $.cdr
+ p $.u.cdr
xcons
end
document nextcons
define xcdr
xgetptr $
xgettype $
- print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->cdr : 0)
+ print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.cdr : 0)
end
document xcdr
Print the cdr of $, assuming it is an Emacs Lisp pair.
define xfloat
xgetptr $
- print ((struct Lisp_Float *) $ptr)->data
+ print ((struct Lisp_Float *) $ptr)->u.data
end
document xfloat
Print $ assuming it is a lisp floating-point number.
an error was signaled.
end
+# Show Lisp backtrace after normal backtrace.
+define hookpost-backtrace
+ set $bt = backtrace_list
+ if $bt
+ echo \n
+ echo Lisp Backtrace:\n
+ xbacktrace
+ end
+end
+
define xreload
set $tagmask = (((long)1 << gdb_gctypebits) - 1)
set $valmask = gdb_use_lsb ? ~($tagmask) : ((long)1 << gdb_valbits) - 1
show environment TERM
set args -geometry 80x40+0+0
+# People get bothered when they see messages about non-existent functions...
+echo \n
+echo If you see messages below about functions not being defined,\n
+echo don\'t worry about them. Nothing is wrong.\n
+echo \n
+
# Don't let abort actually run, as it will make
# stdio stop working and therefore the `pr' command above as well.
break abort
+# The MS-Windows build replaces abort with its own function.
+break w32_abort
+
# If we are running in synchronous mode, we want a chance to look around
# before Emacs exits. Perhaps we should put the break somewhere else
# instead...