GNU bug report logs - #79932
[PATCH] ; * src/.gdbinit: Document xfmt, a user-defined function.

Previous Next

Package: emacs;

Reported by: Jeremy Bryant <jb <at> jeremybryant.net>

Date: Mon, 1 Dec 2025 22:53:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 79932 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to dancol <at> dancol.org, eliz <at> gnu.org, bug-gnu-emacs <at> gnu.org:
bug#79932; Package emacs. (Mon, 01 Dec 2025 22:53:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jeremy Bryant <jb <at> jeremybryant.net>:
New bug report received and forwarded. Copy sent to dancol <at> dancol.org, eliz <at> gnu.org, bug-gnu-emacs <at> gnu.org. (Mon, 01 Dec 2025 22:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] ; * src/.gdbinit: Document xfmt, a user-defined function.
Date: Mon, 01 Dec 2025 22:52:19 +0000
[Message part 1 (text/plain, inline)]
This patch adds user documentation for xfmt, accessible as
(gdb) help xfmt
in GDB.

(Adding Daniel as the author of this, for any comments or suggestions)


Eli, there are also other functions which are missing docs, but their meaning is
less clear to me.  If this is explained I can write a patch.
I am looking to document what we have in .gdbinit before adding any
potential helper functions as part of my prototype C/Lisp hybrid debugging.

What do these do?
xprintstr
xgetptr
xgetint
xgetsym




[0001-src-.gdbinit-Document-xfmt-a-user-defined-function.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79932; Package emacs. (Thu, 04 Dec 2025 12:39:01 GMT) Full text and rfc822 format available.

Message #8 received at 79932 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jeremy Bryant <jb <at> jeremybryant.net>
Cc: 79932 <at> debbugs.gnu.org, dancol <at> dancol.org
Subject: Re: bug#79932: [PATCH] ;
 * src/.gdbinit: Document xfmt, a user-defined function.
Date: Thu, 04 Dec 2025 14:38:31 +0200
> Cc: Daniel Colascione <dancol <at> dancol.org>, Eli Zaretskii <eliz <at> gnu.org>
> From: Jeremy Bryant <jb <at> jeremybryant.net>
> Date: Mon, 01 Dec 2025 22:52:19 +0000
> 
> This patch adds user documentation for xfmt, accessible as
> (gdb) help xfmt
> in GDB.
> 
> (Adding Daniel as the author of this, for any comments or suggestions)

Thanks, see my comments below.

> Eli, there are also other functions which are missing docs, but their meaning is
> less clear to me.  If this is explained I can write a patch.
> I am looking to document what we have in .gdbinit before adding any
> potential helper functions as part of my prototype C/Lisp hybrid debugging.
> 
> What do these do?
> xprintstr
> xgetptr
> xgetint
> xgetsym

They are helper commands that are not very useful on their own.  (The
rule of thumb is: if a command is called from several other commands,
it's a helper command.)  I don't think they need to be documented.

> +document xfmt
> +Format $ and print it as a string.
> +Calls into Lisp, then prints within GDB.

I'd say "Format the argument Lisp value using %S as format, and print it."

I'd also add "Works only when an inferior emacs is executing.", as
that is important.




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.