Re: RTe: Location Specs (Was: [pushed v5] gdb/manual: Introduce location specs)

Pedro Alves
2022-06-02T13:44:46Z

On 2022-06-02 13:56, Eli Zaretskii wrote:
>> Date: Thu, 2 Jun 2022 13:40:10 +0100
>> Cc: gdb-patches@sourceware.org
>> From: Pedro Alves <pedro@palves.net>
>>
>> The original text before my changes used "specifies":
>>
>> Several @value{GDBN} commands accept arguments that specify a location
>> of your program's code. Since @value{GDBN} is a source-level
>> debugger, a location usually specifies some line in the source code.
>> Locations may be specified using three different formats:
>> linespec locations, explicit locations, or address locations.
>>
>> and I wanted to extend it to give the function name, address, label, etc. examples,
>> other attributes one can specify.
>>
>> I don't recall exactly how I got to "indicate". To me, in something
>> like "-line LINENUM", LINENUM is the line indicated in the spec. In
>> "-function FUNC", FUNC is the function name indicated in the spec.
>> I think I was just trying to avoid the repetition in "a specification specifies",
>> which sounds like it was a mistake, as it introduced ambiguity. Better to
>> go back to "specifies".
>
> OK, how about this instead?
>
> Several @value{GDBN} commands accept arguments that specify a location
> or locations of your program's code. Many times locations are
> specified using a source line number, but they can also be specified
> by a function name, an address, a label, etc. The different
> forms of specifying a location that @value{GDBN} recognizes are
> collectively known as forms of @dfn{location specification}, or
> @dfn{location spec}. This section documents the forms of specifying
> locations that @value{GDBN} recognizes.

Perfect.

>
>>>>> For a C@t{++} constructor, the @value{NGCC} compiler generates several
>>>>> -instances of the function body, used in different cases.
>>>>> +instances of the function body, used in different cases, but their
>>>>> +source-level names are identical, unless you qualify them.
>>>>
>>>> What do you mean by "qualify" here?
>>>
>>> The "fully-qualified and prototyped function" part.
>>
>> That's unrelated to what is being alluded to here.
>
> OK, I will drop the "unless you qualify them" part.

Sounds good.