Ctrl+C

If your program seems to be caught in a loop, you can press Ctrl+C. The debugger interprets this as a command to send a signal interrupt (SIGINT) to your program. Because the debugger itself catches signal SIGINT by default, this interrupts your program and returns control to the debugger prompt.

If you give the command ignore SIGINT, then it is no longer possible to regain control of your program using Ctrl+C. In that case, signal SIGINT is delivered directly to your program. Unless your program has explicitly arranged otherwise, SIGINT will result in program termination.