public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11526] New: GDB thinks every type is a a possibility for tab completion on template arguments
@ 2010-04-21 15:15 k04jg02 at gmail dot com
  2010-04-21 17:30 ` [Bug c++/11526] " k04jg02 at gmail dot com
  2010-04-29 20:59 ` swagiaal at redhat dot com
  0 siblings, 2 replies; 4+ messages in thread
From: k04jg02 at gmail dot com @ 2010-04-21 15:15 UTC (permalink / raw)
  To: gdb-prs

When debugging with GDB, I had a templated member function on an object called
'segment'. I wanted to run a specific instantiation of this function, so I wrote:

print segment.dereference<

And then pressed TAB. GDB promptly responded:

Display all 15226 possibilities? (y or n)

I believe this is the total number of types present in the binary. For most
programs this list is huge, which makes it impractical for TAB completion.
However, the vast majority of these types won't work because instantiations of
this template were only made for a few types when g++ compiled the app, because
only a few specific instantiations exist in the source.

It would be nice if GDB only listed types for which there are actually
instantiations of the template in the binary, both to make the list shorter and
because these are the only ones that will succeed. Typing the types manually
isn't even a great workaround because often times template parameters are hugely
nested types several namespaces deep and often with their own template parameters.

-- 
           Summary: GDB thinks every type is a a possibility for tab
                    completion on template arguments
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: k04jg02 at gmail dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=11526

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11526] GDB thinks every type is a a possibility for tab completion on template arguments
  2010-04-21 15:15 [Bug c++/11526] New: GDB thinks every type is a a possibility for tab completion on template arguments k04jg02 at gmail dot com
@ 2010-04-21 17:30 ` k04jg02 at gmail dot com
  2010-04-29 20:59 ` swagiaal at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: k04jg02 at gmail dot com @ 2010-04-21 17:30 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From k04jg02 at gmail dot com  2010-04-21 17:30 -------
Thinking about this a little more, it's theoretically possible that a future
shared library load could contain a new instantiation, and you may want to break
on that instantiation before the library loads. But that's not the common case.
Even when that does happen it'll probably be an instantiation on a type internal
to that shared library that isn't loaded yet either. But the current behavior
isn't useful at all even for trivial programs that specify few types (including
any standard header, like iostream, will likely bring in a ton of types). So I
think it would be best if tab completion only showed instantiations that are
actually available, but gdb still had the behavior of letting you type in
unloaded symbols to break on in a future shared library load.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11526

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11526] GDB thinks every type is a a possibility for tab completion on template arguments
  2010-04-21 15:15 [Bug c++/11526] New: GDB thinks every type is a a possibility for tab completion on template arguments k04jg02 at gmail dot com
  2010-04-21 17:30 ` [Bug c++/11526] " k04jg02 at gmail dot com
@ 2010-04-29 20:59 ` swagiaal at redhat dot com
  1 sibling, 0 replies; 4+ messages in thread
From: swagiaal at redhat dot com @ 2010-04-29 20:59 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |swagiaal at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11526

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11526] GDB thinks every type is a a possibility for tab completion on template arguments
       [not found] <bug-11526-4717@http.sourceware.org/bugzilla/>
@ 2011-06-01 13:08 ` timp at pulsic dot com
  0 siblings, 0 replies; 4+ messages in thread
From: timp at pulsic dot com @ 2011-06-01 13:08 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=11526

Tim <timp at pulsic dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timp at pulsic dot com

--- Comment #2 from Tim <timp at pulsic dot com> 2011-06-01 13:08:08 UTC ---
It also seems to complete on everything for parameters to 'regular' C/C++
functions (compiled using the C++ front end, although i'm not sure that is
relevant). The usual invocation here is an inadvertent double-tab which results
in a dump of all types/symbols deemed suitable - this takes so long to complete
for our main binaries that the only expedient course of action is to kill gdb
and start again.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-01 13:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-21 15:15 [Bug c++/11526] New: GDB thinks every type is a a possibility for tab completion on template arguments k04jg02 at gmail dot com
2010-04-21 17:30 ` [Bug c++/11526] " k04jg02 at gmail dot com
2010-04-29 20:59 ` swagiaal at redhat dot com
     [not found] <bug-11526-4717@http.sourceware.org/bugzilla/>
2011-06-01 13:08 ` timp at pulsic dot com

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).