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: Thu, 10 Dec 2015 22:36:32 +0000 Message-ID: <87poye2aof.fsf@russet.org.uk> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1449787018 1387 80.91.229.3 (10 Dec 2015 22:36:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Dec 2015 22:36:58 +0000 (UTC) Cc: nrichard@ulb.ac.be, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 10 23:36:49 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 1a79pL-0004sm-FV for ged-emacs-devel@m.gmane.org; Thu, 10 Dec 2015 23:36:43 +0100 Original-Received: from localhost ([::1]:44741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a79pK-0006zH-QB for ged-emacs-devel@m.gmane.org; Thu, 10 Dec 2015 17:36:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a79pH-0006yd-HM for emacs-devel@gnu.org; Thu, 10 Dec 2015 17:36:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a79pG-0006D2-BR for emacs-devel@gnu.org; Thu, 10 Dec 2015 17:36:39 -0500 Original-Received: from cheviot12.ncl.ac.uk ([128.240.234.12]:60864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a79pC-0006Bv-8t; Thu, 10 Dec 2015 17:36:34 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot12.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1a79pB-0006ot-AY; Thu, 10 Dec 2015 22:36:33 +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 1a79pB-0008V4-0Q; Thu, 10 Dec 2015 22:36:33 +0000 In-Reply-To: <837fkqdxq7.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 7 Dec 2015 18:34:08 +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.12 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:196080 Archived-At: Eli Zaretskii writes: >> Actually, it wasn't! >> >> etc/DEBUG >> >> has a section called "Getting Control to the Debugger". The section >> BEFORE that mentions >> >> kill -TSTP PID > > 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? >> It's good. Slightly more detail that I would have added (less is more in >> a brief tutorial). > > Thanks. Where to stop is a judgment call: too short descriptions risk > to leave the perplexed in their confused state. > >> I would put back my short "run through". > > It makes the section longer ;-) Yeah, I know. "Hello World" is important though. > 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. 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. > 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!). >> Also, the section on "pp" needs to mention that this prints to >> standard out (this is true right?). > > Good point, I added that. (No, it writes to stderr, but on GNU/Linux > you can redirect it to a file.) Ah, of course. Same window in gdb-many-windows! >> 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. > >> Which probably needs to be renamed (Programming Emacs Manual?) >> -- I noticed the section on modules going in the other day which isn't >> very lispy! > > We have a section on writing Emacs primitives, had it for a long time. > In fact, the entire Appendix E there is full of non-Lispy stuff. So > that ship sailed quite some time ago. I won't argue about the name; > it's for the FSF to consider anyway, since they are selling it as a > book. I agree. I just mentioned it in passing! Phil