4

I unwisely asked gdb to list all defined functions.

(gdb) info function

Now it is excitedly slurping up CPU and memory. If I'm really quick about it, GDB will stop with Ctrl-C and give me a prompt again.

(gdb) info functions
^CQuit
(gdb)

But if I'm too slow, it won't respond to Ctrl-C (SIGINT), Ctrl-\ (SIGQUIT), or SIGTERM.

(gdb) info functions
^C^C^\

Oddly enough, GDB does respond to SIGUSR1.

(gdb) info functions
^C^C^\User defined signal 1

However, this ends my GDB session and I have to start all over again. Is there another way to halt a slow-running command that doesn't kill GDB entirely?

For the record, I'm running GDB version 7.12.0.20161007-git on Debian 9.3 (stretch).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.