From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Debugging Emacs Date: Fri, 11 Dec 2015 09:39:55 +0200 Message-ID: <83y4d18md0.fsf@gnu.org> References: <87r3jbicg0.fsf@russet.org.uk> <83wpt3qq7b.fsf@gnu.org> <87lh9jp073.fsf@russet.org.uk> <83h9k6r1z8.fsf@gnu.org> <878u5hlxqd.fsf@russet.org.uk> <8337vpq2po.fsf@gnu.org> <87zixxkdth.fsf@russet.org.uk> <87si3na9yr.fsf@ulb.ac.be> <83h9jxf9l2.fsf@gnu.org> <87oae27fix.fsf@russet.org.uk> <837fkqdxq7.fsf@gnu.org> <87poye2aof.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1449819609 15939 80.91.229.3 (11 Dec 2015 07:40:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Dec 2015 07:40:09 +0000 (UTC) Cc: nrichard@ulb.ac.be, emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 11 08:40:01 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 1a7IJ5-0008O3-Bg for ged-emacs-devel@m.gmane.org; Fri, 11 Dec 2015 08:39:59 +0100 Original-Received: from localhost ([::1]:46275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7IJ4-0004lU-L8 for ged-emacs-devel@m.gmane.org; Fri, 11 Dec 2015 02:39:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7IJ1-0004lK-Dv for emacs-devel@gnu.org; Fri, 11 Dec 2015 02:39:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7IIy-0007yN-8M for emacs-devel@gnu.org; Fri, 11 Dec 2015 02:39:55 -0500 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:44769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7IIx-0007yB-R1 for emacs-devel@gnu.org; Fri, 11 Dec 2015 02:39:52 -0500 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NZ600600NZSH500@mtaout26.012.net.il> for emacs-devel@gnu.org; Fri, 11 Dec 2015 09:42:18 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NZ600LYGO2IJU80@mtaout26.012.net.il>; Fri, 11 Dec 2015 09:42:18 +0200 (IST) In-reply-to: <87poye2aof.fsf@russet.org.uk> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 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:196090 Archived-At: > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: , > Date: Thu, 10 Dec 2015 22:36:32 +0000 > > > We are miscommunicating. I didn't mean "kill -TSTP", I meant its > > equivalent C-z. "kill -TSTP" is only needed when Emacs hangs or > > infloops while already running under GDB. By contrast, the sub-thread > > to which I responded talked about ways to get control to GDB in > > general, where I think C-z is a much more important and much easier > > technique than "kill -TSTP". Safer, too. > > Perhaps I am being thick, but I tried C-z and AFAICT it does nothing. I > mean, where do I type C-z? In the debugged Emacs? In the Emacs running > gdb? Into the Emacs window, like DEBUG says. > > Seriously, though: the few steps you described there are quite > > possibly not what the user will need to do, so I think it would get in > > the way. > > I'd welcome simplification. Alas, there is no simplification I could think of. > Having a brief run though that anyone could follow till they have a > breakpointed Emacs would help. I'm no expert, so need feedback on > anything that makes it shorter. It can only be longer, if we want it to be relevant. The simplest debugging scenarios are too diverse to allow a short introduction that is useful. See the "Sample Session" node in the GDB manual for what such an introduction looks like. We could point to that if you think it will be useful. Or we could have something similar (but specific to Emacs) in DEBUG, but then it cannot be in the preamble, it should be elsewhere, and the preamble could refer to it. One other thing to keep in mind is that having documentation that is too closely tied to the current source (e.g., quoting function and variable names) is a certain maintenance burden, since functions and variables are routinely renamed, moved to other places, and deleted as part of development, and we then have yet another file to keep in sync with that. Not rocket science, just one more thing to consider when deciding whether this is worth the hassle. > > And I'm not sure why it's important to mention "ppt", but not a > > gazillion of other useful functions in .gdbinit. > > It's not. I mention "pp" because I think it's really important. To > mention one useful function is not enough though, you need to mention > another so you can say there are many other functions and you should > read .gdbinit. I chose ppt because it seemed to make the point well (bad > pun!). Everything except "ppt" is still there, including "pp" and the reference to a later section where other commands are described. > >> Probably, etc/DEBUG needs to be replaced with a section in the elisp > >> manual. > > > > Somebody already mentioned that. I don't think I agree: when you > > debug, you need the instructions be available on the simplest medium > > possible, so a plain text file is better than Info. What's more > > important, a single file with a distinct name is easier found than a > > section in a large manual. > > Unconvinced. The single large manual is also on the web and it's easier > to find there than as a file in etc/DEBUG. I tried searching for "Emacs > debug with GDB" and various other combinations before I found etc/DEBUG. > Which I found because you described it on Emacs-devel. It's mentioned in CONTRIBUTE, FWIW. That should be the first place people look for this information. I don't know how to advertise it better, and I very much doubt having it in the manual will do the job: look at how many questions get posted that are already in the manuals.