From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83mt5jghej.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7109"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61453@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 12 14:35:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRCVc-0001ct-QW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Feb 2023 14:35:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRCVU-0006U4-2z; Sun, 12 Feb 2023 08:35:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRCVS-0006Ts-49 for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 08:35:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRCVR-0005mX-R2 for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 08:35:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRCVR-0004NH-It for bug-gnu-emacs@gnu.org; Sun, 12 Feb 2023 08:35:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Feb 2023 13:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61453 X-GNU-PR-Package: emacs Original-Received: via spool by 61453-submit@debbugs.gnu.org id=B61453.167620888616788 (code B ref 61453); Sun, 12 Feb 2023 13:35:01 +0000 Original-Received: (at 61453) by debbugs.gnu.org; 12 Feb 2023 13:34:46 +0000 Original-Received: from localhost ([127.0.0.1]:44377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRCVC-0004Mh-Ck for submit@debbugs.gnu.org; Sun, 12 Feb 2023 08:34:46 -0500 Original-Received: from mx3.muc.de ([193.149.48.5]:24863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRCVA-0004MW-C6 for 61453@debbugs.gnu.org; Sun, 12 Feb 2023 08:34:45 -0500 Original-Received: (qmail 77207 invoked by uid 3782); 12 Feb 2023 14:34:36 +0100 Original-Received: from acm.muc.de (pd953a525.dip0.t-ipconnect.de [217.83.165.37]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 12 Feb 2023 14:34:36 +0100 Original-Received: (qmail 5061 invoked by uid 1000); 12 Feb 2023 13:34:36 -0000 Content-Disposition: inline In-Reply-To: <83mt5jghej.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255412 Archived-At: 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 > > 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).