Re: [PATCH] Improve break-range's documentation

Eli Zaretskii via Gdb-patches
2022-05-31T12:09:53Z

> Date: Tue, 31 May 2022 13:03:30 +0100
> Cc: gdb-patches@sourceware.org
> From: Pedro Alves <pedro@palves.net>
>
> >> +specs. @value{GDBN} resolves both @var{start-locspec} and
> >> +@var{end-locspec}, and uses the addresses of the resolved code
> >> +locations as start and end addresses of the range to break at. If
> >> +either @var{start-locspec} or @var{end-locspec} resolve to multiple
> >> +code locations in the program, then the command aborts with an error
> >> +without creating a breakpoint. The breakpoint will stop execution of
> >> +the inferior whenever it executes an instruction at any address
> >> +between the start and end addresses, inclusive.
> >
> > This is fine, but please swap the last sentence with the one before
> > it, since, as written, the penultimate sentence breaks the logic of
> > the description of what the command does by describing an exceptional
> > situation too early.
>
> The way it is written made sense to me, as we first say GDB resolves
> the locspecs, and then the exceptional situation is exactly about the
> resolving we just described.

IME, it is usually better to describe what the command does normally,
and only after that what it does in an exceptional case. Users are
usually after the former.

> Anyhow, I'll change it and merge.

Thanks.