Normally when you run a program through GDB you can press Ctrl+C to interrupt it, e.g. if it gets stuck in an infinite loop and you want to get a backtrace.
I\'m deb
In the gdb prompt you can do "handle SIGINT stop" so that gdb catches CTRL-C