Re: [PATCHv7 3/4] gdb/python: new class gdb.StyleParameterSet

Eli Zaretskii
2025-08-13T13:07:27Z

> From: Andrew Burgess <aburgess@redhat.com>
> Cc: Andrew Burgess <aburgess@redhat.com>
> Date: Wed, 13 Aug 2025 11:34:30 +0100
>
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -144,6 +144,10 @@ info threads [-gid] [-stopped] [-running] [ID]...
> gdb.INTENSITY_DIM for use with gdb.Style when representing
> intensities.
>
> + ** New gdb.StyleParameterSet for creating custom style settings.
> + Use gdb.StyleParameterSet(NAME) to create 'set style NAME ...'
> + and 'show style NAME ...' parameters.
> +

This part is okay.

> +@smallexample
> +@group
> +(@value{GDBP}) python s = gdb.StyleParameterSet("my-style")
> +(@value{GDBP}) show style my-style
> +style my-style background: The "my-style" style background color is: none
> +style my-style foreground: The "my-style" style foreground color is: none
> +style my-style intensity: The "my-style" style display intensity is: normal
> +(@value{GDBP})
> +@end group
> +@end smallexample
> +
> +You might also want to group a number of styles within a new prefix,
> +similar to how @value{GDBN} groups disassembler related styles within
> +the @samp{style disassembler} prefix. This can be done using
> +@code{gdb.ParameterPrefix} (@pxref{gdb.ParameterPrefix}), as in this
> +example:
> +
> +@smallexample
> +@group
> +(@value{GDBP}) python gdb.ParameterPrefix("style my-group", gdb.COMMAND_NONE)
> +(@value{GDBP}) python s_a = gdb.StyleParameterSet("my-group aaa")
> +(@value{GDBP}) python s_b = gdb.StyleParameterSet("my-group bbb")
> +(@value{GDBP}) show style my-group
> +style my-group aaa background: The "my-group aaa" style background color is: none
> +style my-group aaa foreground: The "my-group aaa" style foreground color is: none
> +style my-group aaa intensity: The "my-group aaa" style display intensity is: normal
> +style my-group bbb background: The "my-group bbb" style background color is: none
> +style my-group bbb foreground: The "my-group bbb" style foreground color is: none
> +style my-group bbb intensity: The "my-group bbb" style display intensity is: normal

These line are too long. Could you make the strings shorter, so that
the lines became shorter?

Okay, with the above fixed, thanks.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>