| 1 | On Android signal handlers are setup by the linker (through debuggerd_client): |
| 2 | https://github.com/android/platform_system_core/blob/6fff551728f75e35b69bd59f2bc722a72d5c6d61/debuggerd/client/debuggerd_client.cpp#L290 |
| 3 | |
| 4 | diff -u -r ../gdb-7.12/gdb/common/signals-state-save-restore.c ./gdb/common/signals-state-save-restore.c |
| 5 | --- ../gdb-7.12/gdb/common/signals-state-save-restore.c 2016-10-07 13:04:17.000000000 -0400 |
| 6 | +++ ./gdb/common/signals-state-save-restore.c 2016-10-09 18:39:27.866619885 -0400 |
| 7 | @@ -58,10 +58,12 @@ |
| 8 | else if (res == -1) |
| 9 | perror_with_name (("sigaction")); |
| 10 | |
| 11 | +#ifndef __ANDROID__ |
| 12 | /* If we find a custom signal handler already installed, then |
| 13 | this function was called too late. */ |
| 14 | if (oldact->sa_handler != SIG_DFL && oldact->sa_handler != SIG_IGN) |
| 15 | internal_error (__FILE__, __LINE__, _("unexpected signal handler")); |
| 16 | +#endif |
| 17 | } |
| 18 | #endif |
| 19 | } |