From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Crashes on w32 and debugging Date: Thu, 28 Feb 2008 21:02:13 -0500 Message-ID: References: <47C6713B.6030309@gmail.com> <47C67775.8060906@gnu.org> <47C75221.2030708@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204250552 32094 80.91.229.12 (29 Feb 2008 02:02:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Feb 2008 02:02:32 +0000 (UTC) Cc: Emacs Devel , Jason Rumney To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 29 03:02:58 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUuaP-0005aL-3D for ged-emacs-devel@m.gmane.org; Fri, 29 Feb 2008 03:02:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUuZs-00026t-U5 for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 21:02:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUuZp-00026c-3F for emacs-devel@gnu.org; Thu, 28 Feb 2008 21:02:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUuZm-00026I-ND for emacs-devel@gnu.org; Thu, 28 Feb 2008 21:02:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUuZm-00026C-Gt for emacs-devel@gnu.org; Thu, 28 Feb 2008 21:02:18 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUuZi-0002He-Pg; Thu, 28 Feb 2008 21:02:14 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAO71xkdMCpz5Wmdsb2JhbACQZgEgnTmBAg X-IronPort-AV: E=Sophos;i="4.25,423,1199682000"; d="scan'208";a="15378030" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 28 Feb 2008 21:02:14 -0500 Original-Received: from pastel.home ([76.10.156.249]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id JEF21714; Thu, 28 Feb 2008 21:02:14 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id DC3AF7FA7; Thu, 28 Feb 2008 21:02:13 -0500 (EST) In-Reply-To: <47C75221.2030708@gmail.com> (Lennart Borgman's message of "Fri, 29 Feb 2008 01:30:25 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90809 Archived-At: >>> I looked in the documentation for how to start Emacs under gdb, but >>> I can't find anything about it in nt/INSTALL. >> >> 1. Rebuild emacs after configure --no-opt (with optimisations on, stepping >> through the code doesn't always act as you expect it, and some variables >> cannot be inspected). > Thanks Jason, but I need a little clarification. After configure I suppose > I should do only "make bootstrap", but not "make install", or? >> 2. cd ${emacs}/src (where ${emacs} is your checkout >> directory). This serves two purposes - it makes it easy for gdb to find >> the emacs sources, and it also loads the .gdbinit in that directory, which >> defines some useful functions for looking at Lisp variables >> and backtraces. >> >> 3. gdb oo/i386/emacs.exe >> >> 4. Set any breakpoints using "break function_name" or "break >> file.c:linenumber" >> >> 5. run -Q > I just started testing this, but with just "run". The crashes are > intermittent so I have to just use it for a while. >> 6. After the breakpoint is hit, step over functions with "next"/"n", or >> step in with "step"/"s". Inspect C variables with "print VARIABLE", if it >> is a lisp variable, "pr" immediately after the print will print its lisp >> value. "bt" will get a backtrace, including the Lisp backtrace as well >> as C. > Should not these instructions go into nt/INSTALL or somewhere else? Maybe not in INSTALL, but adding such information to etc/DEBUG would probably be helpful, Stefan