[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to debug an emacs hang?
From: |
Miles Bader |
Subject: |
Re: how to debug an emacs hang? |
Date: |
Tue, 18 May 2004 20:03:46 -0400 |
User-agent: |
Mutt/1.3.28i |
On Tue, May 18, 2004 at 04:38:08PM -0700, John Owens wrote:
> I'd like to figure out how/where it's hanging, but I don't know how I
> might do so. Suggestions?
Run emacs in gdb, preferably from the src directory where you compiled emacs:
$ cd ~/emacs-build/src
$ gdb ./emacs
[There's a special .gdbinit file in that directory that defines handy emacs
debugging commands.]
When it hangs, hit C-z or something to exit to the debugger (you can't use
C-c like usual when debugging emacs, because emacs' standard .gdbinit file
changes gdb's SIGINT handling to make C-g work properly on ttys).
Then look at a C backtrace ("backtrace") and lisp backtrace ("xbacktrace")
to see what's up.
For more fun, do the above from another emacs session using emacs' `M-x gdb'
command.
-Miles
--
Any man who is a triangle, has thee right, when in Cartesian Space, to
have angles, which when summed, come to know more, nor no less, than
nine score degrees, should he so wish. [TEMPLE OV THEE LEMUR]