]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: Guile: Remove procedures ineffectual since Guile 2.2
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 5 Dec 2025 04:05:49 +0000 (01:05 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Wed, 10 Dec 2025 03:27:42 +0000 (03:27 +0000)
The manual mentions since GDB 10 that the functions for getting and setting
the size of memory port buffers are deprecated, and don't work when using
Guile 2.2 or later.  Since now GDB only supports Guile 2.2 and newer,
perform the promised removal.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/NEWS
gdb/doc/guile.texi
gdb/guile/lib/gdb.scm
gdb/guile/scm-ports.c

index 3b0a7f7c3d3413e6d6e68d407d35c696bad2e850..0eff1d551a3d46bc043f0185f86b3cfd3d997dc3 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -137,6 +137,14 @@ qExecAndArgs
      contains the gdb.Corefile object if a core file is loaded into
      the inferior, otherwise, this contains None.
 
+* Guile API
+
+  ** Procedures 'memory-port-read-buffer-size',
+     'set-memory-port-read-buffer-size!', 'memory-port-write-buffer-size',
+     and 'set-memory-port-write-buffer-size!' have been removed.  They were
+     deprecated since GDB 10.  Users who need to control the size of a
+     memory port's internal buffer can use the 'setvbuf' procedure.
+
 *** Changes in GDB 17
 
 * Debugging Linux programs that use x86-64 or x86-64 with 32-bit pointer
index 83ea3e09c30798644fcf542ff8293d04deb33310..cbb3e257efa0ae33886eaa3c23f782be62e8b21f 100644 (file)
@@ -3666,41 +3666,6 @@ of two elements: @code{(start end)}.  The range is @var{start} to @var{end}
 inclusive.
 @end deffn
 
-@deffn {Scheme Procedure} memory-port-read-buffer-size memory-port
-Return the size of the read buffer of @code{<gdb:memory-port>}
-@var{memory-port}.
-
-This procedure is deprecated and will be removed in @value{GDBN} 11.
-It returns 0 when using Guile 2.2 or later.
-@end deffn
-
-@deffn {Scheme Procedure} set-memory-port-read-buffer-size! memory-port size
-Set the size of the read buffer of @code{<gdb:memory-port>}
-@var{memory-port} to @var{size}.  The result is unspecified.
-
-This procedure is deprecated and will be removed in @value{GDBN} 11.
-When @value{GDBN} is built with Guile 2.2 or later, you can call
-@code{setvbuf} instead (@pxref{Buffering, @code{setvbuf},, guile, GNU
-Guile Reference Manual}).
-@end deffn
-
-@deffn {Scheme Procedure} memory-port-write-buffer-size memory-port
-Return the size of the write buffer of @code{<gdb:memory-port>}
-@var{memory-port}.
-
-This procedure is deprecated and will be removed in @value{GDBN} 11.
-It returns 0 when @value{GDBN} is built with Guile 2.2 or later.
-@end deffn
-
-@deffn {Scheme Procedure} set-memory-port-write-buffer-size! memory-port size
-Set the size of the write buffer of @code{<gdb:memory-port>}
-@var{memory-port} to @var{size}.  The result is unspecified.
-
-This procedure is deprecated and will be removed in @value{GDBN} 11.
-When @value{GDBN} is built with Guile 2.2 or later, you can call
-@code{setvbuf} instead.
-@end deffn
-
 A memory port is closed like any other port, with @code{close-port}.
 
 Combined with Guile's @code{bytevectors}, memory ports provide a lot
index d02729707a6b09c01c075ec048d113c1a864d87c..bf554eadcaf5660b8c4b2c26b3446b7aaa8676e7 100644 (file)
  open-memory
  memory-port?
  memory-port-range
- memory-port-read-buffer-size
- set-memory-port-read-buffer-size!
- memory-port-write-buffer-size
- set-memory-port-write-buffer-size!
  ;; with-gdb-output-to-port, with-gdb-error-to-port are in experimental.scm.
 
  ;; scm-pretty-print.c
index de0cf8000840221ef7d5159f78f06e7b8918d291..1f31071f8b1fc3a945fe452e3305118d19da4767 100644 (file)
@@ -716,42 +716,6 @@ gdbscm_memory_port_range (SCM port)
   return scm_list_2 (gdbscm_scm_from_ulongest (iomem->start),
                     gdbscm_scm_from_ulongest (iomem->end));
 }
-
-/* (memory-port-read-buffer-size port) -> integer */
-
-static SCM
-gdbscm_memory_port_read_buffer_size (SCM port)
-{
-  return scm_from_uint (0);
-}
-
-/* (set-memory-port-read-buffer-size! port size) -> unspecified
-   An exception is thrown if read data is still buffered or if the port
-   is unbuffered.  */
-
-static SCM
-gdbscm_set_memory_port_read_buffer_size_x (SCM port, SCM size)
-{
-  return scm_setvbuf (port, scm_from_utf8_symbol ("block"), size);
-}
-
-/* (memory-port-write-buffer-size port) -> integer */
-
-static SCM
-gdbscm_memory_port_write_buffer_size (SCM port)
-{
-  return scm_from_uint (0);
-}
-
-/* (set-memory-port-write-buffer-size! port size) -> unspecified
-   An exception is thrown if write data is still buffered or if the port
-   is unbuffered.  */
-
-static SCM
-gdbscm_set_memory_port_write_buffer_size_x (SCM port, SCM size)
-{
-  return scm_setvbuf (port, scm_from_utf8_symbol ("block"), size);
-}
 \f
 /* Initialize gdb ports.  */
 
@@ -788,32 +752,6 @@ Return #t if the object is a memory port." },
     "\
 Return the memory range of the port as (start end)." },
 
-  { "memory-port-read-buffer-size", 1, 0, 0,
-    as_a_scm_t_subr (gdbscm_memory_port_read_buffer_size),
-    "\
-Return the size of the read buffer for the memory port." },
-
-  { "set-memory-port-read-buffer-size!", 2, 0, 0,
-    as_a_scm_t_subr (gdbscm_set_memory_port_read_buffer_size_x),
-    "\
-Set the size of the read buffer for the memory port.\n\
-\n\
-  Arguments: port integer\n\
-  Returns: unspecified." },
-
-  { "memory-port-write-buffer-size", 1, 0, 0,
-    as_a_scm_t_subr (gdbscm_memory_port_write_buffer_size),
-    "\
-Return the size of the write buffer for the memory port." },
-
-  { "set-memory-port-write-buffer-size!", 2, 0, 0,
-    as_a_scm_t_subr (gdbscm_set_memory_port_write_buffer_size_x),
-    "\
-Set the size of the write buffer for the memory port.\n\
-\n\
-  Arguments: port integer\n\
-  Returns: unspecified." },
-
   END_FUNCTIONS
 };