This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/3 v2] Limit tab-completion result when list is large
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 6 Nov 2014 10:50:43 +0000
- Subject: [PATCH 0/3 v2] Limit tab-completion result when list is large
- Authentication-results: sourceware.org; auth=none
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.
Tested on RHEL6.5 x86_64, no regressions.
Is this ok to commit?
Thanks,
Gary
--
http://gbenson.net/