Revert "Fix TIZEN_FEATURE_DEBUG_MODE" 22/223522/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 30 Jan 2020 11:10:14 +0000 (20:10 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 30 Jan 2020 11:10:18 +0000 (20:10 +0900)
This reverts commit d93d44147c92bbaa3c47b477418afb6cb83a1454.

Change-Id: I10b4ba6ca162a218f863e0e6e746da19edfb3484

packaging/aul.spec
src/aul_unix_signal.c

index 6745646..81f1ab8 100755 (executable)
@@ -63,6 +63,12 @@ Application utility library (test tools)
 %define tizen_feature_prelink 0
 %endif
 
+%if "%{?tizen_build_devel_mode}" == "1"
+%define tizen_debug_mode 1
+%else
+%define tizen_debug_mode 0
+%endif
+
 %prep
 %setup -q
 sed -i 's|TZ_SYS_DB|%{TZ_SYS_DB}|g' %{SOURCE1001}
@@ -75,7 +81,9 @@ CFLAGS="%{optflags} -D__emul__"; export CFLAGS
 
 %if 0%{?tizen_feature_prelink}
 _TIZEN_FEATURE_PRELINK=ON
-%else
+%endif
+
+%if 0%{?tizen_debug_mode}
 _TIZEN_FEATURE_DEBUG_MODE=ON
 %endif
 
index ae31ef1..670a34f 100644 (file)
 
 #define _GNU_SOURCE
 
-#include <dlfcn.h>
-#include <execinfo.h>
 #include <signal.h>
 #include <stdio.h>
 
 #include "aul_unix_signal.h"
 #include "aul_util.h"
 
+#ifdef TIZEN_FEATURE_DEBUG_MODE
+#include <dlfcn.h>
+#include <execinfo.h>
+
 #define BT_BUF_SIZE 128
 
 #define PRINT_BACKTRACE() do {                                                 \
@@ -56,8 +58,7 @@
                 }                                                              \
         }                                                                      \
 } while (0)
-
-#if TIZEN_FEATURE_DEBUG_MODE
+#endif /* TIZEN_FEATURE_DEBUG_MODE */
 
 typedef enum {
        AUL_SIGHUP,
@@ -146,7 +147,9 @@ static void __aul_unix_signal_handler(int signo, siginfo_t *info, void *arg)
        _E("[__SIGNAL__] signal: %d(%s)",
                        signo, __get_aul_signo_string(__get_aul_signo(signo)));
 
+#ifdef TIZEN_FEATURE_DEBUG_MODE
        PRINT_BACKTRACE();
+#endif /* TIZEN_FEATURE_DEBUG_MODE */
 
        if (__callback)
                __callback(signo, __user_data);
@@ -157,22 +160,18 @@ static void __aul_unix_signal_handler(int signo, siginfo_t *info, void *arg)
                raise(signo);
        }
 }
-#endif /* TIZEN_FEATURE_DEBUG_MODE */
 
 int aul_unix_signal_set_event_cb(aul_unix_signal_cb callback,
                void *user_data)
 {
-#if TIZEN_FEATURE_DEBUG_MODE
        __callback = callback;
        __user_data = user_data;
-#endif /* TIZEN_FEATURE_DEBUG_MODE */
 
        return 0;
 }
 
 int aul_unix_signal_init(void)
 {
-#if TIZEN_FEATURE_DEBUG_MODE
        struct sigaction action = { 0, };
        int signo;
        int i;
@@ -186,14 +185,12 @@ int aul_unix_signal_init(void)
                if (signo != -1)
                        sigaction(signo, &action, &__old_action[i]);
        }
-#endif /* TIZEN_FEATURE_DEBUG_MODE */
 
        return 0;
 }
 
 void aul_unix_signal_fini(void)
 {
-#if TIZEN_FEATURE_DEBUG_MODE
        int signo;
        int i;
 
@@ -204,5 +201,4 @@ void aul_unix_signal_fini(void)
                if (signo != -1)
                        sigaction(signo, &__old_action[i], NULL);
        }
-#endif /* TIZEN_FEATURE_DEBUG_MODE */
 }