X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-debug.c;h=db403a6baf36b88cf7753ae7e76c22e16ded1f74;hb=a3acd11d38255758b87f2b00e5c2550b056e8672;hp=228f710e2d4be7ab72ccd51d90208c1769f731b7;hpb=4e72c3a2a4e550f99430d1f37a8ef693d2daa8c3;p=src%2Fapp-framework-binder.git diff --git a/src/afb-debug.c b/src/afb-debug.c index 228f710e..db403a6b 100644 --- a/src/afb-debug.c +++ b/src/afb-debug.c @@ -30,6 +30,9 @@ #include #include #include +#if !defined(NO_CALL_PERSONALITY) +#include +#endif #include "verbose.h" @@ -82,15 +85,7 @@ void afb_debug(const char *key) struct sigaction sa, psa; sigset_t ss, oss; - if (has_key(key, secure_getenv(key_env_break))) { - NOTICE("DEBUG BREAK before %s", key); - memset(&sa, 0, sizeof sa); - sa.sa_handler = handler; - sigaction(SIGINT, &sa, &psa); - raise(SIGINT); - sigaction(SIGINT, &psa, NULL); - NOTICE("DEBUG BREAK after %s", key); - } else if (has_key(key, secure_getenv(key_env_wait))) { + if (has_key(key, secure_getenv(key_env_wait))) { NOTICE("DEBUG WAIT before %s", key); sigfillset(&ss); sigdelset(&ss, SIGINT); @@ -106,6 +101,18 @@ void afb_debug(const char *key) indicate(NULL); sigprocmask(SIG_SETMASK, &oss, NULL); NOTICE("DEBUG WAIT after %s", key); +#if !defined(NO_CALL_PERSONALITY) + personality((unsigned long)-1L); +#endif + } + if (has_key(key, secure_getenv(key_env_break))) { + NOTICE("DEBUG BREAK before %s", key); + memset(&sa, 0, sizeof sa); + sa.sa_handler = handler; + sigaction(SIGINT, &sa, &psa); + raise(SIGINT); + sigaction(SIGINT, &psa, NULL); + NOTICE("DEBUG BREAK after %s", key); } }