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

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

(gdb) info functions

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 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.