tizen 2.4 release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20151029.031701 submit/tizen_2.4/20151028.064709 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 08:05:57 +0000 (17:05 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 08:05:57 +0000 (17:05 +0900)
LICENSE.APLv2 [moved from LICENSE with 100% similarity]
NOTICE
packaging/sys-assert.spec
packaging/tizen-debug-off.service
packaging/tizen-debug-on.service
src/sys-assert.c

similarity index 100%
rename from LICENSE
rename to LICENSE.APLv2
diff --git a/NOTICE b/NOTICE
index ccdad52..0e0f016 100755 (executable)
--- a/NOTICE
+++ b/NOTICE
@@ -1,3 +1,3 @@
 Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
 Except as noted, this software is licensed under Apache License, Version 2.
-Please, see the LICENSE file for Apache License terms and conditions.
+Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
index 95eb11d..00733a7 100644 (file)
@@ -44,7 +44,7 @@ make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
 mkdir -p %{buildroot}/usr/share/license
-cp LICENSE %{buildroot}/usr/share/license/%{name}
+cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}%{_libdir}/systemd/system/sysinit.target.wants
 install -m 0644 %{SOURCE101} %{buildroot}%{_libdir}/systemd/system/tizen-debug-on.service
 install -m 0644 %{SOURCE102} %{buildroot}%{_libdir}/systemd/system/tizen-debug-off.service
index 7c0db59..6d2378f 100644 (file)
@@ -11,6 +11,7 @@ Type=oneshot
 RemainAfterExit=yes
 ExecStart=/bin/rm -f /opt/etc/.debugmode
 ExecStart=/sbin/sysctl kernel.core_pattern=/dev/null
+SmackProcessLabel=sys-assert
 
 [Install]
 WantedBy=sysinit.target
index 94dd3da..22656b3 100644 (file)
@@ -9,6 +9,7 @@ Type=oneshot
 RemainAfterExit=yes
 ExecStart=/bin/touch -f /opt/etc/.debugmode
 ExecStart=/sbin/sysctl kernel.core_pattern=/opt/usr/share/crash/core/%%p_%%s_%%e.core
+SmackProcessLabel=sys-assert
 
 [Install]
 WantedBy=sysinit.target
index 41f033e..7c6709e 100644 (file)
@@ -49,7 +49,7 @@
 #define STATUS_PATH "/proc/self/status"
 #define TASK_PATH "/proc/self/task"
 
-#define CRASH_INFO_PATH "/tmp"
+#define CRASH_INFO_PATH "/tmp/crash_info"
 #define CRASH_SOCKET "/tmp/crash_socket"
 #define CRASH_SOCKET_PATH_LEN 17
 
@@ -125,20 +125,26 @@ static int trace_symbols(void *const *array, int size, struct addr_node *start,
                /* because of launchpad,
                 * return value of dladdr when find executable is wrong.
                 * so fix dli_fname here */
-               if (info_funcs.dli_fbase == (void *)BASE_LAUNCHPAD_ADDR &&
-                               info_funcs.dli_fname &&
-                               (strncmp("/opt/apps/",
-                                                info_funcs.dli_fname,
-                                                strlen("/opt/apps/")) == 0)) {
+               if (info_funcs.dli_fbase &&
+                       info_funcs.dli_fname &&
+                       info_funcs.dli_fbase == (void *)BASE_LAUNCHPAD_ADDR &&
+                       (strncmp("/opt/apps/", info_funcs.dli_fname,
+                                        strlen("/opt/apps/")) == 0)) {
                        info_funcs.dli_fname = get_fpath(array[cnt], start);
                        offset_addr = addr;
                } else {
                        offset_addr = addr - start_addr;
                }
+
                /* find symbol from elf file */
                if (info_funcs.dli_sname == NULL) {
-                       if (info_funcs.dli_fname == NULL)
+
+                       /* Both dli_sname and dli_fname is NULL, sys-assert cannot trace any information.
+                          Thus, sys-assert skips to translate such address entry.
+                          However, if a developer wants raw information, we need to fix the code to print raw data */
+                       if(info_funcs.dli_fname == NULL)
                                continue;
+
                        file = open(info_funcs.dli_fname, O_RDONLY);
                        if (file < 0) {
                                fname = strchr(info_funcs.dli_fname, '/');
@@ -658,12 +664,9 @@ void sighandler(int signum, siginfo_t *info, void *context)
        }
        /* check crash info dump directory, make directory if absent */
        if (access(CRASH_INFO_PATH, F_OK) == -1) {
-               if (mkdir(CRASH_INFO_PATH, DIR_PERMS) < 0) {
-                       fprintf(stderr,
-                                       "[sys-assert]can't make dir : %s errno : %s\n",
-                                       CRASH_INFO_PATH, strerror(errno));
-                       return;
-               }
+               fprintf(stderr, "[sys-assert] No directory (%s)", CRASH_INFO_PATH);
+               /*TODO: making directory */
+               return;
        }
        /* logging crash information to stderr */
        fprintf(stderr, "crashed [%s] processname=%s, pid=%d, tid=%d, signal=%d",