debug function: enter gdb when signal catched