GDB: Ctrl+C doesn't interrupt process as it usually does but rather terminates the program

前端 未结 5 1803
南旧
南旧 2020-12-05 02:05

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

5条回答
  •  半阙折子戏
    2020-12-05 02:39

    I'll bet that xmms2d is using sigwait() to handle signals, which breaks gdb's ability to catch CTRL-C. See https://bugzilla.kernel.org/show_bug.cgi?id=9039

    I got an idea for a workaround by reading Continue to debug after failed assertion on Linux? -- when I'm ready to break in gdb, I run "kill -TRAP " from another terminal window.

提交回复
热议问题