This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 32/40] Make "break foo" find "A::foo", A::B::foo", etc. [C++ and wild matching]


On 11/22/2017 08:48 AM, Pedro Alves wrote:
> On 08/09/2017 12:48 AM, Keith Seitz wrote:
>> On 06/02/2017 05:22 AM, Pedro Alves wrote:
>>
>> I think this would read better if it read: "This behavior may be overridden
>> by using the \"-qualified\" flag and specifying a fully qualified name."
>> [I am not a fan of using informal writing in documentation.]
> 
> How about the even simpler:
> 
> @@ -15295,7 +15295,10 @@ Explicit locations are similar to linespecs but use an option/argument\n\
>  syntax to specify location parameters.\n\
>  Example: To specify the start of the label named \"the_top\" in the\n\
>  function \"fact\" in the file \"factorial.c\", use \"-source factorial.c\n\
> --function fact -label the_top\".\n"
> +-function fact -label the_top\".\n\
> +For C++, \"-function\" matches functions and methods by name, ignoring\n\
> +missing leading specifiers (namespaces and classes).\n\
> +\"-qualified\" matches functions and methods by fully qualified name.\n"
>  

Simple is good!

>>>  /* This help string is used for the break, hbreak, tbreak and thbreak
>>>     commands.  It is defined as a macro to prevent duplication.
>>> diff --git a/gdb/completer.c b/gdb/completer.c
>>> index eabbce7..99e40a3 100644
>>> --- a/gdb/completer.c
>>> +++ b/gdb/completer.c
>>> @@ -609,6 +612,7 @@ static const char *const explicit_options[] =
>>>    {
>>>      "-source",
>>>      "-function",
>>> +    "-qualified",
>>>      "-line",
>>>      "-label",
>>>      NULL
>>
>> The "-qualified" option can be used with linespecs, too, right?
> 
> Not really, no.
> 

If I've read my catch-up mail correctly, there's been a change of plan here.
So I'll just respond to the relevant parts not addressed in follow-ups.
If I've missed something, don't hesitate to point them out to me. [You know
where to find me.]

> Do you see "-qualified" being an alternative to "-function"
> instead of a flag as a blocker?
> 
> Please let me know.

I don't think this is relevant anymore, but just in case: Do *not* delay the
next release for this. 8.1 absolutely *needs* this patch set.

> Here's the current/updated patch.

That all looks okay to me. [TBH, I've just diffed this with the previous.] I will look to the follow-on immediately.

Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]