setting a gdb exit breakpoint not working?

后端 未结 3 1044
北恋
北恋 2020-12-12 17:26

I\'ve set breakpoints on exit and _exit and my program (multithreaded app, running on linux 2.6.16.46-0.12 sles10), is somehow still exiting in a way I can\'t locate

3条回答
  •  清歌不尽
    2020-12-12 18:05

    Setting the breakpoint on _exit was a good idea.

    You might also try linking statically, just to take a stack of potential gdb complications off the table.

    0177 is suspiciously like the wait status wait(2) returns for child stopped, but gdb is printing the exit status, which is a different thing, so that's probably a real exit argument.

提交回复
热议问题