Subject: Re: bug#61453: It is annoying to have to type 'print foo' before each .gdbinit command.

From: Eli Zaretskii <[email-masked]>
Date: Sun, 12 Feb 2023 15:08:52 +0200

> Date: Sun, 12 Feb 2023 13:01:57 +0000
> From: Alan Mackenzie <[email-masked]>
> 
> 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.