Kevin Rodgers <[EMAIL PROTECTED]> writes:

> Note that you can provide a full path to the etc/DEBUG file:
> (expand-file-name "etc/DEBUG" data-directory)

Thanks, I did that in the change I installed.

> But how about providing an Emacs command to debug the crash and
> instructions on how to use it:

This is a very good suggestion -- but I think it needs a little more
work to handle cases where people already run emacs in gdb, etc.

You are welcome to work on that.

>
>       If emacs crashed, try running the gdb debugger on the program
>       and its core file:
>       
>               M-x gdb-emacs-crash
>               (gdb) bt full
>               (gdb) xbacktrace
>       
>       Then insert the *gud* buffer into this report.  The file
>       /usr/local/share/emacs/21.3/etc/DEBUG explains how to further
>       debug the crash.
>
> (defun gdb-emacs-crash (program core)
>    "*Run gdb on the crashed emacs PROGRAM and its dumped CORE file."
>    (interactive
>     (let ((insert-default-directory t))
>       (list (read-file-name "Program: "
>                             invocation-directory nil t invocation-name)
>             (read-file-name "Core: "
>                             (with-current-buffer "*scratch*"
>                               default-directory)
>                             nil
>                             t
>                             "core"))))
>    (gdb (format "gdb %s %s" program core)))

-- 
Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to