Bug 20623 - tab-completion doesn't work too well with "(anonymous namespace)"
Summary: tab-completion doesn't work too well with "(anonymous namespace)"
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Pedro Alves
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-19 19:06 UTC by dje
Modified: 2020-07-22 14:35 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dje 2016-09-19 19:06:14 UTC
Tried to find an existing bug for this (as always ...).

(gdb) b foo::<tab><tab>
(anonymous namespace)::bar
b::foo_meth()
foo_fn()
...
(gdb) b foo::(anon<tab><tab>
<nothing>
(gdb) b foo::(<tab><tab>
everything(?)

I'm expecting "b foo::(anon<tab><tab>" to autocomplete "(anonymous namespace)" and so on. Plus, if we're going to have "(anonymous namespace)" then "b foo::(<tab><tab>" should we aware that the user isn't asking to start the search from the empty string.
Comment 1 dje 2016-09-19 19:21:51 UTC
The problem isn't specific to (anonymous namespace) of course.

(gdb) b foo::foo<tab><tab>
->
(gdb) b foo:foo_fn(
then tab,tab again -> everything.

foo_fn having multiple versions:

namespace foo {
void foo_fn() { ... }
void foo_fn(int t) { ... }
}
Comment 2 Pedro Alves 2017-10-06 14:15:16 UTC
This series should fix it:
  https://sourceware.org/ml/gdb-patches/2017-06/msg00012.html
Comment 3 trass3r 2020-07-22 14:12:58 UTC
I think the existing bug was https://sourceware.org/bugzilla/show_bug.cgi?id=16874
Comment 4 Pedro Alves 2020-07-22 14:35:12 UTC
That series was merged to master some time after I pointed at that series in 2017.  I think we're good to close the bug now.  Please reopen if you believe otherwise.