[PATCH 0/2] Limit tab-completion result when list is large

Gary Benson gbenson@redhat.com
Wed Feb 12 11:55:00 GMT 2014


Hi all,

When debugging large programs, pressing the Tab key at the wrong
time causes GDB to lock up while it builds a completion list.  As
an example, with LibreOffice:

 $ gdb /usr/lib64/libreoffice/program/soffice.bin
 (gdb) start
 (gdb) p <Tab>

On my (pretty fast!) machine the user is left hanging for over a
minute while GDB builds a list of the 217667 things the user could
print.  This is PR cli/11920.

PR cli/15548 proposes to abort building the completion list if it
grows too large, the theory being that nobody is going to scroll
through thousands of screens of completions to find the one they
want.  These two patches implement this.  The default limit is 1000
completions, which the user can override with a new set/show var.

Tested on RHEL6.5 x86_64, no regressions.

Thanks,
Gary

-- 
http://gbenson.net/



More information about the Gdb-patches mailing list