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 3/3] Support template lookups in strncmp_iw_with_mode


On 02/06/2018 10:15 AM, Pedro Alves wrote:
>       2 PASS: gdb.linespec/cpcompletion.exp: template-no-list: compare "b -function template_struct::template_overload_fn" completion list with bp location list: matches
>       2 PASS: gdb.linespec/cpcompletion.exp: template-no-list: compare "b template_struct::template_overload_fn" completion list with bp location list: matches
> 

I thought I'd checked that. Fixed.

> Using gdb.linespec/cpcompletion, we see:
> 
>  (gdb) complete b template2_fn<int, int>(template2_ret_typ
>  b template2_fn<int, int>(template2_ret_type<int>, int, int)
>                                            ^^^^^^^^^^^^^^^^^
> 
>  (gdb) complete b template2_fn<int, int>(template2_ret_type
>  b template2_fn<int, int>(template2_ret_type, int, int)
>                                             ^^^^^^^^^^^
> 
> Notice how in the first case, we completed at the character
> before "template2_ret_type", and in that case, we include
> the template parameters in the match.  

Yeah, that's how it is currently implemented. My intent was to mimick overloaded functions. Looking at it now, though, I see that I didn't quite get it right (for some reason):

(gdb) b template2_fn<TAB>
-->
(gdb) b template2_fn(template2_ret<int>, int, int)

Compared with (gdb.cp/cpexprs.exp): 

(gdb) b overload<TAB>
-->
(gdb) b overload(
base::overload() const       base::overload(int) const
base::overload(base&) const  base::overload(long) const
base::overload(char*) const  base::overload(short) const

Let me see if I can fix that.

Keith


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