From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: Debugging Emacs Date: Fri, 27 Nov 2015 22:05:52 +0000 Message-ID: <87lh9jp073.fsf@russet.org.uk> References: <87r3jbicg0.fsf@russet.org.uk> <83wpt3qq7b.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448661990 13647 80.91.229.3 (27 Nov 2015 22:06:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2015 22:06:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 27 23:06:19 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a2R9m-0006jM-Nu for ged-emacs-devel@m.gmane.org; Fri, 27 Nov 2015 23:06:18 +0100 Original-Received: from localhost ([::1]:58700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2R9p-0000V7-Nv for ged-emacs-devel@m.gmane.org; Fri, 27 Nov 2015 17:06:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2R9U-0000T0-Lk for emacs-devel@gnu.org; Fri, 27 Nov 2015 17:06:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2R9T-0003jP-Of for emacs-devel@gnu.org; Fri, 27 Nov 2015 17:06:00 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:33760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2R9O-0003hr-3B; Fri, 27 Nov 2015 17:05:54 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1a2R9N-00028u-EZ; Fri, 27 Nov 2015 22:05:53 +0000 Original-Received: from cpc6-benw10-2-0-cust45.gate.cable.virginm.net ([92.238.179.46] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1a2R9N-0002bb-Aw; Fri, 27 Nov 2015 22:05:53 +0000 In-Reply-To: <83wpt3qq7b.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Nov 2015 19:58:48 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195418 Archived-At: Eli Zaretskii writes: >> From: phillip.lord@russet.org.uk (Phillip Lord) >> Date: Fri, 27 Nov 2015 17:23:11 +0000 >> >> I debugged Emacs core the other day for the first time. As I have no >> experience with C, GDB or any of the Emacs tooling, I found this an >> uphill struggle, so I have written up a short "how-to-debug" Emacs file. > > Thanks. Some of this is already in etc/DEBUG, other parts belong to > basic GDB operation, so I'm not sure we should describe that in > Emacs. I suggest that you read etc/DEBUG, if you didn't already, and > suggest changes to that file where you think it leaves something > important uncovered. With etc/DEBUG, I am worried not about what it does not say, but what it does say. It's really very dense. For example, it starts with a description of what src/.gdbinit does (at which point I still don't know how to launch the debugger). Then has a very heavy section on compiler flags which includes a section on DWARF. > More specifically, how about a preamble section at the beginning of > etc/DEBUG, named something like "If you are new to debugging Emacs", > and describing the preliminaries you think are important? You can > refer to later sections instead of repeating what they say. Yes, that was sort of the idea. Personally, I'd not be too worried about repeating things. I realise that this adds to the maintainance burden, but references to later sections make for harder reading. I'll try and simplify what I wrote a bit further. Basically, I am after the debugging hello world -- make a breakpoint, get the value of a LispObject. Phil