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

Pedro Alves
2022-05-31T12:04:10Z

On 2022-05-31 12:55, Eli Zaretskii wrote:
>> Date: Tue, 31 May 2022 12:31:40 +0100
>> Cc: gdb-patches@sourceware.org
>> From: Pedro Alves <pedro@palves.net>
>>
>> Set a breakpoint for an address range given by @var{start-locspec} and
>> @var{end-locspec}, which are location specs. @xref{Location
>> Specifications}, for a list of all the possible forms of location
>> -specs. If either @var{start-locspec} or @var{end-locspec} resolve to
>> -multiple addresses 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 within the specified range, including @var{start-locspec} and
>> -@var{end-locspec}.
>> +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.

Anyhow, I'll change it and merge.