Next: Q2.1.16, Previous: Q2.1.14, Up: Installation
If SXEmacs does crash on you, one of the most productive things you can do to help get the bug fixed is to poke around a bit with the debugger. Here are some hints:
attach
command or something similar.
assert_failed()
.
signal_1()
—this is
declared static in eval.c.
x_error_handler()
; that will tell you which call is causing them.
Lisp_Object
. These are references to Lisp objects.
Printing them out with the debugger probably won’t be too
useful—you’ll likely just see a number. To decode them, do this:
call dp (OBJECT)
where OBJECT is whatever you want to decode (it can be a variable, a function call, etc.). This uses the Lisp printing routines to out a readable representation on the TTY from which the sxemacs process was invoked.
call db ()
dp
and db
has two disadvantages - they can only be
used with a running (including hung or zombie) sxemacs process, and they
do not display the internal C structure of a Lisp Object. Even if all
you’ve got is a core dump, all is not lost.
If you’re using GDB, there are some macros in the file src/.gdbinit in the SXEmacs source distribution that should make it easier for you to decode Lisp objects. This file is automatically read by gdb if gdb is run in the directory where sxemacs was built, and contains these useful macros to inspect the state of sxemacs:
pobj
Usage: pobj lisp_object
Print the internal C representation of a lisp object.
xtype
Usage: xtype lisp_object
Print the Lisp type of a lisp object.
lbt
Usage: lbt
Print the current Lisp stack trace.
Requires a running sxemacs process. (It works by calling the db
routine described above.)
ldp
Usage: ldp lisp_object
Print a Lisp Object value using the Lisp printer.
Requires a running sxemacs process. (It works by calling the dp
routine described above.)
run-temacs
Usage: run-temacs
Run temacs interactively, like sxemacs.
Use this with debugging tools (like purify) that cannot deal with
dumping, or when temacs builds successfully, but sxemacs does not.
dump-temacs
Usage: dump-temacs
Run the dumping part of the build procedure.
Use when debugging temacs, not sxemacs!
Use this when temacs builds successfully, but sxemacs does not.
check-sxemacs
Usage: check-sxemacs
Run the test suite. Equivalent to ’make check’.
check-temacs
Usage: check-temacs
Run the test suite on temacs. Equivalent to ’make check-temacs’.
Use this with debugging tools (like purify) that cannot deal with dumping,
or when temacs builds successfully, but sxemacs does not.
If you are using Sun’s dbx debugger, there is an equivalent file src/.dbxrc, which defines the same commands for dbx.
Next: Q2.1.16, Previous: Q2.1.14, Up: Installation