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


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

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: bug-gnu-emacs <at> gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: [PATCH] New debugger-trap function to break to GDB
Date: Sat, 02 Aug 2025 21:10:14 +0100
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> On 2025-08-01 16:19, Jeremy Bryant wrote:
>> 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
>
> In the past I've used Facos for this purpose, under the theory that
> nobody ever calls acos so I know a breakpoint there means I want the
> debugger trap.
>
> With that in mind I suggest documenting in the doc string that Emacs
> never calls this function except to do X, Y and Z, where X Y and Z are
> spelled out clearly. (I assume X Y and Z all have to do with
> debugging.)

Thanks, the doc string currently says this:

       doc: /* Trap execution flow and hand over control to GDB.
To use, set up a breakpoint to this function from GDB.
The function itself is a do-nothing primitive.  */)


Would the following clarification be clearer from your perspective?

       doc: /* Trap execution flow and hand over control to GDB.
To use, set up a breakpoint in GDB with 
break Fdebugger_trap
This is done in the Emacs source distribution in src/.gdbinit.

The function itself is a do-nothing primitive.  It is reserved for
debugging purposes, and not called by Emacs otherwise.  */)





This bug report was last modified 3 days ago.

Previous Next


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