10

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?

ks1322
  • 33,961
  • 14
  • 109
  • 164

2 Answers2

7

There are still open bugs on tab completion in gdb Bugzilla:

Edit: gdb 7.10.0 has a max-completions variable with a default of 200.

dshepherd
  • 4,989
  • 4
  • 39
  • 46
ks1322
  • 33,961
  • 14
  • 109
  • 164
  • 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
  • 1
    thanks 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
  • Both of those bugs are closed now. – Arunprasad Rajkumar Nov 23 '15 at 11:13
  • 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