2

I am coding in C++ in Linux. I have handled the ctrl C signal so that I could clean up all the resources upon exit. However, I have the problem when I run gdb. Ctrl C is also the stopping of the gdb command. Hence, how do I send the ctrl C to my programme so that I could test my written resource clean up code?

Thanks.

2 Answers 2

6

At gdb's command prompt:

signal SIGINT
Sign up to request clarification or add additional context in comments.

Comments

1

You can tell GDB to pass the signal through to your program and not stop:

(gdb) handle SIGINT pass nostop

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.