Subject: Re: bug#66750: Unhelpful text in C-h v for variables with a lambda form as value

From: Andrea Corallo <[email-masked]>
Date: Thu, 02 Nov 2023 13:12:37 -0400

Eli Zaretskii <[email-masked]> writes:

[...]

>> > Maybe so, but if your feature doesn't bring us closer to that goal,
>> > then for me personally it is much less interesting.
>> 
>> Maybe we could put no-ops into the byte compiled format, where each no-op
>> had a position argument.  But that would make Emacs a bit slower.  Or we
>> could add an extra "debugging" field to the structure which would contain
>> the position information.  As with lots of things, macros would
>> complicate such a scheme.  In the native compiled format, isn't there
>> already a standard way of writing this info?
>
> I don't know, but Andrea probably will.

In libgccjit one can append gcc_jit_locations [1] to store filename,
line and column of original code generating the statement/operator being
described.

These information are for native debuggers like gdb that parse object
files and the stack, so I think they will not help any internal Emacs
debugger.

Best Regards

  Andrea

[1]
<https://gcc.gnu.org/onlinedocs/jit/topics/locations.html#c.gcc_jit_location>