Re: [PATCH v2 4/4] Introduce the "with" command

Eli Zaretskii
2019-06-19T16:53:50Z

> Cc: gdb-patches@sourceware.org, philippe.waroquiers@skynet.be
> From: Pedro Alves <palves@redhat.com>
> Date: Wed, 19 Jun 2019 16:46:23 +0100
>
> >> +@cindex change default behavior of commands
> >> +@cindex change default settings
> >
> > Two index entries that start with the same text and point to the same
> > place are not useful. I'd drop the second one.
>
> I thought it was useful because someone skimming the
> index might not relate "behavior of commands" to "settings"
> and vice versa. (settings affect more than commands, like
> e.g., they change how gdb reacts to inferior events, like forking.)
> But looking at the resulting page, I have to agree with you,
> at least the the repetition seems odd.
>
> Some settings use a comma to add some kind of context.
> So how about doing something similar here, like:
>
> @cindex change default behavior of commands, settings
>
> ?

I'd suggest to reorder the words of your original second entry:

@cindex default settings, changing

Then we can have both of these entries.

> +If a @var{command} is provided, it must be preceded by a double dash
> +(@code{--}) separator. This is required because some settings accept
> +free-form arguments, such as expressions or filenames.
>
> As I had mentioned before, it may be we can make this delimiter
> optional. Also, we may need a "with -separate SEP" option in
> case someone wants to use an expression with "--" in it. However,
> I'd rather leave it to a separate pass, as I don't want to spend
> much more time on this at this point and the need for that should
> be quite rare.

OK. We can revisit the text when we get to that second pass.

> SETTING is any GDB setting changeable with the "set" command.
>
> Do you have a better suggestion?

Instead of "changeable", I'd use "you can change". Otherwise, SGTM.

> + @var{value} is the value the setting is changed to while
> +the command is run.

Let's try to avoid passive tense, okay?

@var{value} is the value to assign to @var{setting} while running
@var{command}.

WDYT?

Thanks.