I am writing a plugin for a application, occasionally a SIGSEGV would be throw out. However, the application catches the signal SIGSEGV. In other word, The plugin is a dynamical library. The error occurs in my plugin and dynamical library. But the applcation handle the sSIGSEGV and exit normally. So, it is quite difficult for me to debug and get the backtrace of all stack frames. Any idea?
Currently I am using gdb as debug tool.
GDB will catch
SIGSEGVbefore the application does.What you described in comment to Logan’s answer makes no sense.
I suspect what’s really happening is that the application creates a new process, and only gets
SIGSEGVin that other process, not the one you attached GDB to.The following commands may be useful if my guess is correct:
You might also want to edit and expand your question:
SIGSEGVto begin with?GDBmay also prove useful.