This is the mail archive of the gdb-prs@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]

[Bug symtab/16586] New: Tab completion different with/without .gdb_index


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

            Bug ID: 16586
           Summary: Tab completion different with/without .gdb_index
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: gbenson at redhat dot com

The list of completions provided when the user enters "b <Tab>" differs
depending on whether .gdb_index is used.

I noticed this using FSF HEAD GDB on RHEL 6.5 LibreOffice; with this
combination .gdb_index support is disabled by default, so it is easy to do
comparisons using the same binaries.

When .gdb_index support is enabled:
a) all the LibreOffice filenames vanish (eg XTextDocument.hpp)
b) lots of broken-looking glibc filenames appear (eg
/usr/src/debug////////glibc-2.12-2-gc4ccff1/string/../sysdeps/x86_64/multiarch/memcmp.S)

To reproduce this I patched GDB to write the list of completions to a file.  To
generate the "with .gdb_index" file I did the following:

  $ /path/to/gdb
  (gdb) set use-deprecated-index-sections on
  (gdb) file /usr/lib64/libreoffice/program/soffice.bin
  (gdb) start
  (gdb) b <Tab><Tab>

To generate the "without .gdb_index" file I omitted the "set
use-deprecated-index-sections on" command.

To compare the two files it is helpful to pipe them through sort and uniq, as
they are unordered and contain duplicates.

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


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