开发者

How to find which thread caused SEGFAULT in a post-mortem gdb session?

开发者 https://www.devze.com 2022-12-27 16:39 出处:网络
In my application, I handle SIGSEG to produce a backtrace and call abort() to generate a core dump. IfI now run a gdb-post-m开发者_运维百科ortem analysis of the core, the thread which caused the SEGFA

In my application, I handle SIGSEG to produce a backtrace and call abort() to generate a core dump.

If I now run a gdb-post-m开发者_运维百科ortem analysis of the core, the thread which caused the SEGFAULT is no longer visible. Is there anything I can do so I see the cause for the SEGFAULT?


You can use command thread apply all bt or thread apply all bt full to get backtraces of all threads. Might be useful.

By the way if you get rid of you handler will your OS create a core file?

0

精彩评论

暂无评论...
验证码 换一张
取 消