I am debugging a rather complex project, I have its source code, currently I need to know the stack trace when daemon exits in certain case, but it is very time consuming to go through the whole code, I want to use gdb to help on this, but commands like “catch exit” won’t work, it told me that “Catch of exit not yet implemented”, so can anyone tell me how to use gdb to catch the exit event of a daemon? Thank you.
Share
I think just setting breakpoints for
exit,_exit, andabortshould get you pretty far.