GNU bug report logs - #77125
[PATCH] igc ; * etc/DEBUG: Fix gdb examples to: call ... (global_igc->arena)

Previous Next

Package: emacs;

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

Date: Wed, 19 Mar 2025 22:55:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77125 in the body.
You can then email your comments to 77125 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77125; Package emacs. (Wed, 19 Mar 2025 22:55:02 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 bug-gnu-emacs <at> gnu.org. (Wed, 19 Mar 2025 22:55: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, Pip Cet <pipcet <at> protonmail.com>, Eli Zaretskii
 <eliz <at> gnu.org>
Subject: [PATCH] igc ; * etc/DEBUG: Fix gdb examples to: call ...
 (global_igc->arena)
Date: Wed, 19 Mar 2025 22:53:40 +0000
Minor fix to recent revised patch, which was missing the improvement.

global_igc->arena




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77125; Package emacs. (Thu, 20 Mar 2025 21:57:02 GMT) Full text and rfc822 format available.

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

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: Jeremy Bryant via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: pipcet <at> protonmail.com, eliz <at> gnu.org, 77125 <at> debbugs.gnu.org
Subject: Re: bug#77125: [PATCH] igc ; * etc/DEBUG: Fix gdb examples to: call
 ... (global_igc->arena)
Date: Thu, 20 Mar 2025 21:56:36 +0000
[Message part 1 (text/plain, inline)]
Jeremy Bryant via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> writes:

> Minor fix to recent revised patch, which was missing the improvement.
>
> global_igc->arena

[0001-etc-DEBUG-Fix-gdb-examples-to-call-.-global_igc-aren.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77125; Package emacs. (Thu, 20 Mar 2025 21:58:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77125; Package emacs. (Fri, 21 Mar 2025 08:32:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jeremy Bryant <jb <at> jeremybryant.net>
Cc: pipcet <at> protonmail.com, 77125 <at> debbugs.gnu.org
Subject: Re: bug#77125: [PATCH] igc ; * etc/DEBUG: Fix gdb examples to: call
 ... (global_igc->arena)
Date: Fri, 21 Mar 2025 10:30:59 +0200
> From: Jeremy Bryant <jb <at> jeremybryant.net>
> Cc: 77125 <at> debbugs.gnu.org,  pipcet <at> protonmail.com,  eliz <at> gnu.org
> Date: Thu, 20 Mar 2025 21:56:36 +0000
> 
> --- a/etc/DEBUG
> +++ b/etc/DEBUG
> @@ -1382,11 +1382,11 @@ states.  Two of these are important for debugging, the clamped and
>  parked states.  When debugging igc, you can clamp the arena before
>  inspecting memory:
>  
> -     (gdb) call mps_arena_clamp(arena)
> +     (gdb) call mps_arena_clamp(global_igc->arena)
>  
>  and then release it afterwards with:
>  
> -     (gdb) call mps_arena_release(arena)
> +     (gdb) call mps_arena_release(global_igc->arena)

Is it really true that the arena pointer is always global_igc->arena
in Emacs?  If so, I would suggest to tell that separately, because the
GDB calls to functions can have arguments constructed in many
different ways.  Something like

  In Emacs, the arena is usually stored in 'global_igc->arena'.

and leave the examples in their current general form.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77125; Package emacs. (Sun, 06 Apr 2025 20:27:01 GMT) Full text and rfc822 format available.

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

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 pipcet <at> protonmail.com, Helmut Eller <eller.helmut <at> gmail.com>,
 77125 <at> debbugs.gnu.org
Subject: Re: bug#77125: [PATCH] igc ; * etc/DEBUG: Fix gdb examples to: call
 ... (global_igc->arena)
Date: Sun, 06 Apr 2025 21:26:01 +0100
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Jeremy Bryant <jb <at> jeremybryant.net>
>>  and then release it afterwards with:
>>  
>> -     (gdb) call mps_arena_release(arena)
>> +     (gdb) call mps_arena_release(global_igc->arena)
>
> Is it really true that the arena pointer is always global_igc->arena
> in Emacs?  If so, I would suggest to tell that separately, because the
> GDB calls to functions can have arguments constructed in many
> different ways.  Something like
>
>   In Emacs, the arena is usually stored in 'global_igc->arena'.
>
> and leave the examples in their current general form.

OK, on that basis please find attached patch adding that line, with 'usually'.

I believe that there is only one global arena on the basis of the
comments below.


igc.c:
/* The registry for an MPS arena.  There is only one arena used.  */


igc.org:
- Arena.  We tell MPS to create the global arena that is used for all
  objects.

All other model objects are handled in the same way, threads, arenas,
pools, object formats and so on.

Igc collects all these MPS handles in a =struct igc=.  This "registry" of
MPS handles is found in the global variable =global_igc= and thus can be
accessed from anywhere.

[0001-etc-DEBUG-Improve-documentation-of-debugging-igc-are.patch (text/x-diff, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Mon, 07 Apr 2025 11:19:02 GMT) Full text and rfc822 format available.

Notification sent to Jeremy Bryant <jb <at> jeremybryant.net>:
bug acknowledged by developer. (Mon, 07 Apr 2025 11:19:02 GMT) Full text and rfc822 format available.

Message #22 received at 77125-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jeremy Bryant <jb <at> jeremybryant.net>
Cc: gerd.moellmann <at> gmail.com, 77125-done <at> debbugs.gnu.org, pipcet <at> protonmail.com,
 eller.helmut <at> gmail.com
Subject: Re: bug#77125: [PATCH] igc ; * etc/DEBUG: Fix gdb examples to: call
 ... (global_igc->arena)
Date: Mon, 07 Apr 2025 14:18:45 +0300
> From: Jeremy Bryant <jb <at> jeremybryant.net>
> Cc: 77125 <at> debbugs.gnu.org,  pipcet <at> protonmail.com, Helmut Eller
>  <eller.helmut <at> gmail.com>, Gerd Möllmann
>  <gerd.moellmann <at> gmail.com>
> Date: Sun, 06 Apr 2025 21:26:01 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Jeremy Bryant <jb <at> jeremybryant.net>
> >>  and then release it afterwards with:
> >>  
> >> -     (gdb) call mps_arena_release(arena)
> >> +     (gdb) call mps_arena_release(global_igc->arena)
> >
> > Is it really true that the arena pointer is always global_igc->arena
> > in Emacs?  If so, I would suggest to tell that separately, because the
> > GDB calls to functions can have arguments constructed in many
> > different ways.  Something like
> >
> >   In Emacs, the arena is usually stored in 'global_igc->arena'.
> >
> > and leave the examples in their current general form.
> 
> OK, on that basis please find attached patch adding that line, with 'usually'.

Thanks, installed on the branch.

Please in the future remember to mention the bug number (when known)
in the commit log message, and also end single-line log messages with
a period.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 05 May 2025 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 66 days ago.

Previous Next


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