How to debug programs using signals?

久未见 提交于 2019-11-30 05:09:17

GDB will stop the inferior (being debugged) program when the inferior receives any signal.

If you simply continue from GDB, the signal will be "swallowed", which is not what you want.

You can ask GDB to continue the program and send it a signal with signal SIGTRAP.

You can also ask GDB to pass a given signal directly to the inferior, and not stop at all with handle SIGTRAP nostop noprint pass GDB command. You'll need to do that before you hit the first SIGTRAP.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!