From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: how to debug an emacs hang? Date: Tue, 18 May 2004 20:03:46 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040519000346.GC32327@fencepost> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084926581 8002 80.91.224.253 (19 May 2004 00:29:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 May 2004 00:29:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 19 02:29:36 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQExk-0007EV-00 for ; Wed, 19 May 2004 02:29:36 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQExj-00014g-00 for ; Wed, 19 May 2004 02:29:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BQEa4-0007TI-4Z for emacs-devel@quimby.gnus.org; Tue, 18 May 2004 20:05:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BQEZP-0007JA-FA for emacs-devel@gnu.org; Tue, 18 May 2004 20:04:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BQEYl-0007AX-Dc for emacs-devel@gnu.org; Tue, 18 May 2004 20:04:18 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BQEYk-0007AT-SS for emacs-devel@gnu.org; Tue, 18 May 2004 20:03:47 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.34) id 1BQEYk-0003U1-G0; Tue, 18 May 2004 20:03:46 -0400 Original-To: John Owens Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Blat: Foop X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23670 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23670 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]