[PATCH 0/3 v2] Abort completion when list becomes large

Gary Benson
2014-11-27T13:16:19Z

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) b <Tab>

On my (pretty fast!) machine the user is left hanging for nearly a
minute while GDB builds a list of the 212405 places the user could
break on. 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 three patches implement this. The default limit is 200
completions, which the user can override with a new set/show option.

This version 2 series has been updated for the symtab rework Doug
recently pushed, and with Eli's suggested documentation changes.

Tested on RHEL6.5 x86_64, no regressions.

Is this ok to commit?

Thanks,
Gary