public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/29314] New: Invalid space completion for template class function symbols
@ 2022-07-01 14:46 macro at orcam dot me.uk
  0 siblings, 0 replies; only message in thread
From: macro at orcam dot me.uk @ 2022-07-01 14:46 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29314

            Bug ID: 29314
           Summary: Invalid space completion for template class function
                    symbols
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: macro at orcam dot me.uk
  Target Milestone: ---

When debugging `cc1' from GCC 12, which has a huge number of template
class functions, e.g.:

hash_table<action_record_hasher, false, xcallocator>::expand()
hash_table<action_record_hasher, false,
xcallocator>::find_slot_with_hash(action_record* const&, unsigned int,
insert_option)
hash_table<action_record_hasher, false, xcallocator>::~hash_table()
hash_table<addr_hasher, false, xcallocator>::expand()
[1100+ entries follow]

if you try to complete it correctly, it seems to work as expected:

(gdb) break hash_tab<Tab>
(gdb) break hash_table<
(gdb) break hash_table<<Tab><Tab>
Display all 200 possibilities? (y or n)

However if you do it with a space inserted, then you get:

(gdb) break hash_tab <Tab>
(gdb) break hash_tab le<

Further completion stops working at this point, presumably because the
completer now looks for a token starting with "le<", but it shouldn't
have inserted the "le<" part in this place, because after a space it's
not the first argument to the `break' command anymore.

To reproduce run:

$ gdb /path/to/cc1

(having compiled `cc1' with debug info of course; the host/target does
not seem to matter, I have seen it with various configurations) and just
enter the commands above.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-01 14:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 14:46 [Bug cli/29314] New: Invalid space completion for template class function symbols macro at orcam dot me.uk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).