]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/trouble.texi
merge trunk
[gnu-emacs] / doc / emacs / trouble.texi
index 1806339e45df63e339f17b4679f3b3a81d597274..1c45287cdaaecd5c98b475c231c8e94b332d7204 100644 (file)
@@ -282,10 +282,15 @@ itself, and the reserve supply may not be enough.
 @subsection When Emacs Crashes
 
   Emacs is not supposed to crash, but if it does, before it exits it
-reports some information about the crash to the standard error stream
-@code{stderr}.  This report may be useful to someone who later debugs
-the same version of Emacs on the same platform.  The format of this
-report depends on the platform, and some platforms support backtraces.
+reports a brief summary  of the crash to the standard error stream
+@code{stderr}.  If enabled, a crashed Emacs also generates a core dump
+containing voluminous data about the crash.  On many platforms you can
+enable core dumps by putting the shell command @samp{ulimit -c unlimited}
+into your shell startup script.  The crash report and core dump can be
+used when debugging the same version of Emacs on the same platform.
+
+The format of the crash report depends on the platform, and some
+platforms support backtraces.
 Here is an example, generated on x86-64 GNU/Linux with version 2.15 of
 the GNU C Library:
 
@@ -308,13 +313,26 @@ emacs[0x565151]
 
 @noindent
 The number @samp{11} is the system signal number that corresponds to
-the problem, a segmentation fault here.  The hexadecimal program
-addresses can be useful in debugging sessions.  For example, the GDB
-command @samp{list *0x509af6} prints the source-code lines
-corresponding to the @samp{emacs[0x509af6]} entry in the backtrace.
+the problem, a segmentation fault here.  The three dots at the end
+indicate that Emacs suppressed further backtrace entries, in the
+interest of brevity.
 
-The three dots at the end indicate that Emacs suppressed further
-backtrace entries, in the interest of brevity.
+The hexadecimal program addresses can be useful in debugging sessions.
+For example, the GDB command @samp{list *0x509af6} prints the
+source-code lines corresponding to the @samp{emacs[0x509af6]} entry in
+the backtrace.  Or, if your system has @command{addr2line}, the
+following shell command outputs a backtrace with source-code line
+numbers:
+
+@example
+sed -n 's/.*\[\(.*\)]$/\1/p' @var{backtrace} |
+  addr2line -Cfip -e @var{bindir}/emacs
+@end example
+
+@noindent
+Here, @var{backtrace} is the name of a text file containing a copy of
+the backtrace, and @var{bindir} is the name of the directory that
+contains the Emacs executable.
 
 @node After a Crash
 @subsection Recovery After a Crash