[PATCH 1/2] guile: Add support for Guile 2.2.
Ludovic Courtès
ludo@gnu.org
Sat Jun 13 15:04:57 GMT 2020
Hi,
In the meantime I found that Doug had already done that work in 2018:
https://sourceware.org/bugzilla/show_bug.cgi?id=21104#c8
Too bad I didn’t notice earlier. I’ll check if there are significant
differences between the two.
Eli Zaretskii <eliz@gnu.org> skribis:
>> These four functions are not used in tests, in documented examples, nor
>> in Guile’s own GDB plugin.
>>
>> ‘setvbuf’ is not entirely a drop-in replacement because: (1) it doesn’t
>> allow you to query a port’s buffer size, only to change it, and (2) it
>> doesn’t distinguish between the read and write buffers. Consequently,
>> these functions cannot be implemented on 2.2/3.0, or at least not
>> easily.
>>
>> Since they are unused, and I can’t see a valid use case for those over
>> ‘setvbuf’, I chose to remove them from the manual as a way to deprecate
>> them.
>>
>> WDYT?
>
> So what is the plan wrt GDB accessing memory of the inferior via
> Guile? Specifically, which parts of the features described in "Memory
> Ports in Guile" in the manual will continue be supported with Guile 2.2
> and later? can we make at least the accessors work with those newer
> versions of Guile?
Yes, everything remains supported, it’s just setting read/write
buffering size in that way that is unsupported.
In most cases, I suspect one just wants an unbuffered memory port
anyway.
> In any case, I don't like the method of deprecating features by
> removing their documentation. I think we should say explicitly in
> that section which methods are deprecated and why. The fact that they
> are deprecated should also be in NEWS. This all assumes that other
> GDB developers agree that they are not needed; I don't have enough
> relevant experience to have an opinion. Maybe Doug (CC'ed) could
> chime in.
Yes, I think we should mention it in ‘NEWS’.
> I also think that Guile should provide proper replacements for the
> functionality you mentioned, because evidently at least GDB thought
> they could be put to good use. But this is outside of the scope of
> GDB maintenance, something for the Guile developers to consider.
Right. For I/O ports in general, I don’t think this functionality would
be very useful. (Even for GDB memory ports, I think ‘setvbuf’ is
enough.)
>> > Also, does any of this need to be called out in NEWS?
>>
>> Oh sure. Should that go in a separate commit or in the same?
>
> The same is better.
Sounds good.
Thanks,
Ludo’.
More information about the Gdb-patches
mailing list