← Back to team overview

touch-packages team mailing list archive

[Bug 1230253] Re: Not-so-smart autocomplete

 

This is still occurring on 14.04.2.

** Changed in: gdb (Ubuntu)
       Status: Invalid => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1230253

Title:
  Not-so-smart autocomplete

Status in gdb package in Ubuntu:
  Confirmed

Bug description:
  gdb seems to have several bugs in command line autocomplete.

  Whenever I want to insert a breakpoint and I start typing the file
  name, if the filename contains a dash '-' instead of an underscore
  '_', gdb doesn't autocomplete correctly. It seems that it only
  considers the string after the dash. Example:

  (gdb) break hmi-con
  connection_ptr                                                    hmi-connection.hpp
  construction vtable for std::istream-in-boost::process::pistream  hmi-connection-state.cpp
  construction vtable for std::ostream-in-boost::process::postream  hmi-connection-state.h
  hmi-connection.cpp                                                
  (gdb) break hmi-conn
  connection_ptr            hmi-connection.cpp        hmi-connection.hpp        hmi-connection-state.cpp  hmi-connection-state.h
  (gdb) break hmi-conn

  and so on.

  If I just write "break hmi-"[TAB][TAB], gdb will output the whole list of symbols for the executable (and ctrl+c is the only way out).
  If I reach the "." ("break hmi-connection."[TAB][TAB]), gdb will again output the whole list of symbols for the executable.

  This happens quite often, whenever a filename with dash '-' is
  involved.

  This is a quite severe bug: gdb should (almost) never output the whole
  list of symbols because this simply makes no sense in most of real-
  life situations. It may make sense in a one-file project where the
  list of symbols is just one or two pages long, but for sure it
  shouldn't be printed out with the [TAB][TAB] sequence.

  The sum of these two bugs is devastating: trying to autocomplete a
  filename with a dash often result in a very long wait possibly
  followed by wrong autocomplete suggestions. If the autocomplete is
  successful, however, it may happen that one has pressed [TAB] more
  than two times (due to the latency), and then the full symbol list
  printout kicks in. This is really frustrating and makes gdb
  autocomplete quite unusable.

  Finally, gdb autocomplete is mostly context-free. Whenever I break in
  a function, I'll probably want to inspect some local variable, but gdb
  prints out every possible match, also including library symbols from
  STL, boost, etc.. Some priority to local symbols should be added
  (maybe expanding the search context according to the number of times
  [TAB] is pressed?).

  I'm using GNU gdb (GDB) 7.6-ubuntu under Ubuntu 13.04 Raring.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1230253/+subscriptions