unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: phillip.lord@russet.org.uk (Phillip Lord)
To: Eli Zaretskii <eliz@gnu.org>
Cc: nrichard@ulb.ac.be, emacs-devel@gnu.org
Subject: Re: Debugging Emacs
Date: Thu, 10 Dec 2015 22:36:32 +0000	[thread overview]
Message-ID: <87poye2aof.fsf@russet.org.uk> (raw)
In-Reply-To: <837fkqdxq7.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 7 Dec 2015 18:34:08 +0200")

Eli Zaretskii <eliz@gnu.org> 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



  parent reply	other threads:[~2015-12-10 22:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27 17:23 Debugging Emacs Phillip Lord
2015-11-27 17:48 ` Karl Fogel
2015-11-27 21:53   ` Phillip Lord
2015-11-28  7:50     ` Eli Zaretskii
2015-11-27 17:58 ` Eli Zaretskii
2015-11-27 18:15   ` Eli Zaretskii
2015-11-27 22:05   ` Phillip Lord
2015-11-28  7:56     ` Eli Zaretskii
2015-11-28 19:39       ` Phillip Lord
2015-11-28 20:38         ` Eli Zaretskii
2015-11-28 21:35           ` Phillip Lord
2015-11-29 18:13             ` Stephen Leake
2015-11-29 19:25               ` John Wiegley
2015-11-29 21:26                 ` Phillip Lord
2015-11-29 19:46               ` Marcin Borkowski
2015-11-30 13:33             ` Nicolas Richard
2015-12-05 10:55               ` Eli Zaretskii
2015-12-07  9:51                 ` Phillip Lord
2015-12-07 16:34                   ` Eli Zaretskii
2015-12-07 18:18                     ` Stephen Leake
2015-12-07 18:30                       ` Eli Zaretskii
2015-12-10 22:36                     ` Phillip Lord [this message]
2015-12-11  7:39                       ` Eli Zaretskii
2015-12-11 15:47                         ` Phillip Lord
2015-11-28  8:41     ` Marcin Borkowski
2015-11-28  9:47       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87poye2aof.fsf@russet.org.uk \
    --to=phillip.lord@russet.org.uk \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=nrichard@ulb.ac.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).