In GDB on MinGW, how do I make Ctrl-C stop the program?

后端 未结 8 1022
灰色年华
灰色年华 2021-02-05 11:50

I\'m on Windows, running GDB on an executable built under MinGW. The program has an infinite loop. I want to find it by hitting Ctrl + C. When I do, both t

8条回答
  •  梦如初夏
    2021-02-05 12:19

    To find the infinite loop, you could try stepping through the execution until you get to a sequence that repeats indefinitely.

    I'm not sure, but I think Ctrl-C should only stop the execution, not gdb itself...

    I think there is a "handle" command that you can use to control how the interrupt signal is handled.

提交回复
热议问题