all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 61453@debbugs.gnu.org
Subject: bug#61453: It is annoying to have to type 'print foo' before each .gdbinit command.
Date: Sun, 12 Feb 2023 13:34:36 +0000	[thread overview]
Message-ID: <Y+jq7LsWLRIfTL3Q@ACM> (raw)
In-Reply-To: <83mt5jghej.fsf@gnu.org>

Hello, Eli.

On Sun, Feb 12, 2023 at 15:08:52 +0200, Eli Zaretskii wrote:
> > Date: Sun, 12 Feb 2023 13:01:57 +0000
> > From: Alan Mackenzie <acm@muc.de>

> > In a GDB session, whilst debugging Emacs, it is common to want to print,
> > for example, the current value of Lisp variable foo.  At the moment, one
> > has to type

> >     p foo
> >     xpr

> > ..  This need, continually to type p (or print) is irritating.  It should
> > be possible simply to type

> >     xpr foo

> > ..  The same applies to many other commands in .gdbinit.

> > The following patch fixes this irritation.  It allows a user to type xpr
> > foo, yet also preserves the old version with no arguments, which can be
> > handy, sometimes.

> > I propose this patch be applied to the master branch.

> What's wrong with the existing "pp" command?  I think it covers all
> your needs, and doesn't need any changes to existing xFOO commands.

The pp comand does nothing on my setup except for scrolling the gdb
window up one line.  Its help text says "Works only when an inferior
emacs is executing.".  I normally start the target Emacs on a separate
Linux console, then attach it to my gdb session with the attach command.
I don't really know what "an inferior emacs" means, though I'm sure I
could find out if I read etc/DEBUG more carefully.

Besides, even if pp worked for me, there will be times when the other
commands will be handy (otherwise they wouldn't be there).  I've never
actually used pp.  I use xpr all the time.

Incidentally, I sneaked in a correction to nextcons which currently has:

    p $.u.cdr

, and which (presumably) since a change in lisp.h needs to be

    p $.u.s.u.cdr

..  I don't understand why we have members car and cdr wrapped in so many
unions and structs.


So, I still think my patch would be a good idea.

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2023-02-12 13:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12 13:01 bug#61453: It is annoying to have to type 'print foo' before each .gdbinit command Alan Mackenzie
2023-02-12 13:08 ` Eli Zaretskii
2023-02-12 13:34   ` Alan Mackenzie [this message]
2023-02-12 14:04     ` Eli Zaretskii
2023-02-12 14:42       ` Alan Mackenzie
2023-02-12 14:49         ` Eli Zaretskii
2023-02-12 16:14           ` Alan Mackenzie
2023-02-12 16:37             ` Eli Zaretskii
2023-02-12 18:23               ` Alan Mackenzie
2023-02-12 18:33                 ` Eli Zaretskii
2023-02-12 18:56                   ` Alan Mackenzie
2023-02-12 19:27                     ` 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

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

  git send-email \
    --in-reply-to=Y+jq7LsWLRIfTL3Q@ACM \
    --to=acm@muc.de \
    --cc=61453@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.