If I accidentally launch tab completion when debugging large binary, gdb will freeze for some time scanning symbol table (up to 1 minute in my case). So I have to wait until whole symbol table is scanned. Is there any way to interrupt this process in gdb?
Asked
Active
Viewed 2,176 times
10
-
2""If i accidentally lunch tab completion"" so you want a lunch break? – Pete Kirkham Feb 28 '09 at 10:07
-
@PeteKirkham well if ks (OP) wanted a lunch break, triggering a massive gdb freeze is a good way to make time for one... ;) – pestophagous Oct 19 '15 at 01:07
2 Answers
7
There are still open bugs on tab completion in gdb Bugzilla:
- Bug 11920 - tab completion might stall cli without any feedback
- Bug 15548 - Limit completions to a pre-defined limit when completions list is very large
Edit: gdb 7.10.0 has a max-completions
variable with a default of 200.
-
I'm also running into this problem. CTRL+C seems to have worked, and I'd be fine with leaving it at that, if GDB hadn't leaked 12GB of RAM in the process. – Wug Oct 03 '14 at 22:34
-
1thanks for linking to those bugs. they were fixed. @ks1322 - you might update this answer. gdb has 'set max-completions' as of gdb 7.10. https://www.gnu.org/software/gdb/news/ https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blobdiff;f=gdb/NEWS;h=f19577a3a6d0ea9ff1015255eafbd965580afa2d;hp=cba21b6645dd09e83943b71d42ad4c3d3c00cad4;hb=ef0b411a110cd2602cb89c3fb237baf8beb28545;hpb=e11c72c7e4879894b9711b5c0b8247c20c6050f6 – pestophagous Oct 19 '15 at 13:59
-
-
My GDB 7.11 still blows up when remote debugging the Linux kernel with QEMU as in http://stackoverflow.com/questions/11408041/how-to-debug-the-linux-kernel-with-gdb-and-qemu/33203642#33203642 if I try to complete a command function argument like `sys_execve`'s `file
`, even though `show max-completions` is 200 :-( – Ciro Santilli OurBigBook.com Feb 18 '17 at 19:24
2
Control c should interrupt it. Have you tried that?
If it doesn't work, you may need a more recent version of gdb.

Michael Snyder
- 5,519
- 4
- 28
- 19