all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Enhancement to report-emacs-bug
@ 2005-07-20 15:03 Kim F. Storm
  2005-07-20 17:31 ` Kevin Rodgers
  2005-07-21  3:58 ` Richard M. Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Kim F. Storm @ 2005-07-20 15:03 UTC (permalink / raw)



I think the following advice would help us get
better bug reports for emacs crashes:

*** emacsbug.el	05 Jul 2005 10:18:12 +0200	1.65
--- emacsbug.el	20 Jul 2005 17:01:40 +0200	
***************
*** 125,131 ****
  
      (insert "\n\n")
      (setq user-point (point))
!     (insert "\n\n\n")
  
      (insert "In " (emacs-version) "\n")
      (if (fboundp 'x-server-vendor)
--- 125,136 ----
  
      (insert "\n\n")
      (setq user-point (point))
!     (insert "\n\n")
! 
!     (insert "If emacs crashed, and you have the emacs process in the gdb debugger,\n"
! 	    "please include the output from the following gdb commands:\n"
! 	    "    `bt full' and `xbacktrace'.\n"
! 	    "The file etc/DEBUG explains how to further debug the crash.\n\n\n")
  
      (insert "In " (emacs-version) "\n")
      (if (fboundp 'x-server-vendor)

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enhancement to report-emacs-bug
  2005-07-20 15:03 Enhancement to report-emacs-bug Kim F. Storm
@ 2005-07-20 17:31 ` Kevin Rodgers
  2005-07-21 12:08   ` Kim F. Storm
  2005-07-21  3:58 ` Richard M. Stallman
  1 sibling, 1 reply; 5+ messages in thread
From: Kevin Rodgers @ 2005-07-20 17:31 UTC (permalink / raw)


Kim F. Storm wrote:
> I think the following advice would help us get
> better bug reports for emacs crashes:
> 
> *** emacsbug.el	05 Jul 2005 10:18:12 +0200	1.65
> --- emacsbug.el	20 Jul 2005 17:01:40 +0200	
> ***************
> *** 125,131 ****
>   
>       (insert "\n\n")
>       (setq user-point (point))
> !     (insert "\n\n\n")
>   
>       (insert "In " (emacs-version) "\n")
>       (if (fboundp 'x-server-vendor)
> --- 125,136 ----
>   
>       (insert "\n\n")
>       (setq user-point (point))
> !     (insert "\n\n")
> ! 
> !     (insert "If emacs crashed, and you have the emacs process in the gdb debugger,\n"
> ! 	    "please include the output from the following gdb commands:\n"
> ! 	    "    `bt full' and `xbacktrace'.\n"
> ! 	    "The file etc/DEBUG explains how to further debug the crash.\n\n\n")
>   
>       (insert "In " (emacs-version) "\n")
>       (if (fboundp 'x-server-vendor)
> 

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

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

	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)))

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enhancement to report-emacs-bug
  2005-07-20 15:03 Enhancement to report-emacs-bug Kim F. Storm
  2005-07-20 17:31 ` Kevin Rodgers
@ 2005-07-21  3:58 ` Richard M. Stallman
  1 sibling, 0 replies; 5+ messages in thread
From: Richard M. Stallman @ 2005-07-21  3:58 UTC (permalink / raw)
  Cc: emacs-devel

    I think the following advice would help us get
    better bug reports for emacs crashes:

It's worth trying--please install it.

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enhancement to report-emacs-bug
  2005-07-20 17:31 ` Kevin Rodgers
@ 2005-07-21 12:08   ` Kim F. Storm
  2005-07-21 16:22     ` Kevin Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: Kim F. Storm @ 2005-07-21 12:08 UTC (permalink / raw)
  Cc: emacs-devel

Kevin Rodgers <ihs_4664@yahoo.com> 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 <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enhancement to report-emacs-bug
  2005-07-21 12:08   ` Kim F. Storm
@ 2005-07-21 16:22     ` Kevin Rodgers
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2005-07-21 16:22 UTC (permalink / raw)


Kim F. Storm wrote:
 > Kevin Rodgers <ihs_4664@yahoo.com> writes:
 >>But how about providing an Emacs command to debug the crash and
 >>instructions on how to use it:
 >>
 >>	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.
 >
 > 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.

If the user is savvy enough to have been running emacs under gdb in the
first place, I think he/she could infer what to do from the instructions
for less-experienced users.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-21 16:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-20 15:03 Enhancement to report-emacs-bug Kim F. Storm
2005-07-20 17:31 ` Kevin Rodgers
2005-07-21 12:08   ` Kim F. Storm
2005-07-21 16:22     ` Kevin Rodgers
2005-07-21  3:58 ` Richard M. Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.