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

From: Jeremy Bryant <[email-masked]>
Date: Sat, 02 Aug 2025 21:21:15 +0100

Jim Porter <[email-masked]> writes:

> On 8/1/2025 4:19 PM, Jeremy Bryant via Bug reports for GNU Emacs, the
> Swiss army knife of text editors wrote:
>> 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.
>
> This looks like a good idea. It might be useful to document more
> thoroughly that this is for setting a breakpoint in GDB and friends,
> rather than in the Elisp debugger. (Unless the plan is to support the
> Elisp debugger too somehow?)

Thanks, maybe this can be clarified - what makes you think of elisp
debugging in this version?  The file debug.el?

>From a user point of view, the proposed docstring doesn't mention Elisp,
only GDB.

It is proposed for debug.el (not edebug.el), for this generality, and
due to the natural fit in this file, although admittedly.

;;; debug.el --- debuggers and related commands for Emacs

Beyond the immediate benefit to developers, the plan and prototype is to
use the Lisp debugger debug or edebug to then have the hybrid debugging,
so that choice of file also makes sense for this future plan.