[RFA] Fix "set" handling of Python parameters

Eli Zaretskii eliz@gnu.org
Fri Apr 27 06:42:00 GMT 2018


> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>
> Date: Thu, 26 Apr 2018 16:51:40 -0600
> 
> +* Python API
> +
> +  ** A gdb.Parameter will no longer print the "set" help text on an
> +     ordinary "set"; instead by default a "set" will be silent unless
> +     the get_set_string method returns a non-empty string.

The code mentions compatibility with GDB < 7.3, so shouldn't NEWS at
least indicate that this breaks that compatibility?

> +If this method exists, @value{GDBN} will call it when a
> +@var{parameter}'s value has been changed via the @code{set} API (for
> +example, @kbd{set foo off}).  The @code{value} attribute has already
> +been populated with the new value and may be used in output.  This
> +method must return a string.  If the returned string is not empty,
> +@value{GDBN} will present it to the user.

So there's no way for a Python extension to display an empty string,
even if it wants to do that?

Anyway, the documentation parts are approved.  Thanks.



More information about the Gdb-patches mailing list