GNU bug report logs - #79144
[PATCH] New debugger-trap function to break to GDB

Previous Next

Package: emacs;

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

Date: Fri, 1 Aug 2025 23:21:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jeremy Bryant <jb <at> jeremybryant.net>
Subject: bug#79144: closed (Re: [PATCH] New debugger-trap function to
 break to GDB)
Date: Thu, 07 Aug 2025 13:41:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#79144: [PATCH] New debugger-trap function to break to GDB

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 79144 <at> debbugs.gnu.org.

-- 
79144: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79144
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Jeremy Bryant <jb <at> jeremybryant.net>
Cc: jporterbugs <at> gmail.com, 79144-done <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: Re: [PATCH] New debugger-trap function to break to GDB
Date: Thu, 07 Aug 2025 16:40:34 +0300
> From: Jeremy Bryant <jb <at> jeremybryant.net>
> Cc: bug-gnu-emacs <at> gnu.org,  Eli Zaretskii <eliz <at> gnu.org>, Jim Porter
>  <jporterbugs <at> gmail.com>
> Date: Sun, 03 Aug 2025 22:41:18 +0100
> 
> OK, revised patch attached for consideration.
> 
> The change is in the docstring, incorporating your suggestion, Paul, as
> well as the addition proposed by Jim, at the end.
> 
> What do people think of this change now?

Thanks, I've now installed this on the master branch, with a few minor
followup changes in the documentation parts, and I'm closing this.

[Message part 3 (message/rfc822, inline)]
From: Jeremy Bryant <jb <at> jeremybryant.net>
To: bug-gnu-emacs <at> gnu.org
Cc: , Eli Zaretskii <eliz <at> gnu.org>, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: [PATCH] New debugger-trap function to break to GDB
Date: Sat, 02 Aug 2025 00:19:26 +0100
[Message part 4 (text/plain, inline)]
Here is a patch to add a default command debugger-trap to break into
GDB, together with a default breakpoint set in .gdbinit
The immediate benefit for developers is a standard command to use where
there isn't one at the moment, as explained in DEBUG, only general guidance.

The long-term benefit is it can be the foundation for further work to
enhance debugging in Emacs with GDB, with the ability to
programmatically break into GDB, something I am working on as part of
C/Lisp hybrid debugging aids.


This patch has received substantial advice and reviewed by Eli.  It is
posted here for the benefit of the community for further discussion.

To recap, we need a do-nothing primitive, whose sole purpose is to
allow setting a breakpoint there to get control to GDB.
redraw-display and similar functions are usually okay, but they could
 get in the way if what they do modifies Emacs in a way that interferes
with debugging, for example if they remove some display artifact one
is debugging, or run functions as side effect that modify the global
state.


Adding Paul Eggert as the main recent contributor to etc/DEBUG for thoughts.

[0001-New-debugger-trap-function-to-break-to-GDB.patch (text/x-diff, attachment)]

This bug report was last modified 4 days ago.

Previous Next


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