tizen 2.3.1 release tizen_2.3.1 submit/tizen_2.3.1/20150915.082148 tizen_2.3.1_release
authorjk7744.park <jk7744.park@samsung.com>
Tue, 8 Sep 2015 13:39:10 +0000 (22:39 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Tue, 8 Sep 2015 13:39:10 +0000 (22:39 +0900)
40 files changed:
.debugmode [moved from sys-assert/.debugmode with 100% similarity]
.gitignore [new file with mode: 0755]
CMakeLists.txt
INSTALL [deleted file]
LICENSE [new file with mode: 0755]
NOTICE [new file with mode: 0755]
build.sh [deleted file]
debian/README.Debian [deleted file]
debian/changelog [deleted file]
debian/compat [deleted file]
debian/control [deleted file]
debian/copyright [deleted file]
debian/dirs [deleted file]
debian/docs [deleted file]
debian/libsys-assert-0.install.in [deleted file]
debian/libsys-assert-0.postinst [deleted file]
debian/org.tizen.blue-screen.install.in [deleted file]
debian/rules [deleted file]
lockupinfo/92-rb-dump.rules [deleted file]
lockupinfo/CMakeLists.txt [deleted file]
lockupinfo/_util_log.h [deleted file]
lockupinfo/lockupinfo.c [deleted file]
lockupinfo/lockupinfo.sh [deleted file]
packaging/sys-assert.manifest [new file with mode: 0644]
packaging/sys-assert.spec
packaging/tizen-debug-off.service [new file with mode: 0644]
packaging/tizen-debug-on.service [new file with mode: 0644]
src/arm/backtrace.c [new file with mode: 0644]
src/arm/context.c [new file with mode: 0644]
src/sys-assert.c [new file with mode: 0644]
src/sys-assert.h [new file with mode: 0755]
src/util.c [new file with mode: 0644]
src/util.h [new file with mode: 0644]
src/x86/backtrace.c [new file with mode: 0644]
src/x86/context.c [new file with mode: 0644]
sys-assert/CMakeLists.txt [deleted file]
sys-assert/src/sys-assert.c [deleted file]
sys-assert/src/sys-assert.h [deleted file]
sys-assert/sys-assert.init.sh [deleted file]
sys-assert/sys-assert.pc [deleted file]

similarity index 100%
rename from sys-assert/.debugmode
rename to .debugmode
diff --git a/.gitignore b/.gitignore
new file mode 100755 (executable)
index 0000000..6c53821
--- /dev/null
@@ -0,0 +1,12 @@
+build_log
+*.log
+*.pyc
+usr
+opt
+*.o
+*.os
+*.exe
+packages
+binaries
+*.ipk
+*~
index eea27ec..910656a 100644 (file)
@@ -1,5 +1,50 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(sys-assert C)
 
-ADD_SUBDIRECTORY(sys-assert)
-ADD_SUBDIRECTORY(lockupinfo)
+SET(SRCS
+       src/sys-assert.c
+       src/util.c
+)
 
+IF("$ENV{CFLAGS}" MATCHES "-DARM")
+       SET(SRCS ${SRCS}
+               src/arm/context.c
+               src/arm/backtrace.c
+       )
+ELSE()
+       SET(SRCS ${SRCS}
+               src/x86/context.c
+               src/x86/backtrace.c
+       )
+ENDIF()
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(LIBDIR "\${prefix}/lib")
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-O2")
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DEAPI")
+ADD_DEFINITIONS("-DDEBUG_ON")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lunwind -ldl)
+
+INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/.debugmode DESTINATION /opt/etc)
diff --git a/INSTALL b/INSTALL
deleted file mode 100644 (file)
index ddf4e78..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,33 +0,0 @@
-1. make the build directory
-
-  ex) 
-
-   $ mkdir build
-
-
-2. change the working directory to the build directory
-
-  ex)
-
-   $ cd build
-
-
-3. run 'cmake'
-
-  $ cmake ${SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=/usr
-
-  ex)
-
-   $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
-
-   or
-
-   $ cmake ..
-
-
-4. make & make install
-
-  ex)
-
-   $ make -j 2 && make install
-
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..8aa906c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,205 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+
diff --git a/NOTICE b/NOTICE
new file mode 100755 (executable)
index 0000000..ccdad52
--- /dev/null
+++ b/NOTICE
@@ -0,0 +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.
diff --git a/build.sh b/build.sh
deleted file mode 100755 (executable)
index fb55e98..0000000
--- a/build.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cd `dirname $0`
-if [ ! -d "./build" ]
-then 
-       mkdir build
-fi
-cd `dirname $0`/build
-cmake ../ -DCMAKE_INSTALL_PREFIX=/usr
-make
-make install
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644 (file)
index 8c05128..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-sys-assert for Debian
----------------------
-
-<possible notes regarding this package - if none, delete this file>
-
- -- unknown <yk.yun@samsung.com>  Wed, 06 Jan 2010 15:31:21 +0900
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644 (file)
index fee49a3..0000000
+++ /dev/null
@@ -1,1281 +0,0 @@
-sys-assert (0.3.1-0) unstable; urgency=low
-
-  * modified changelog.
-  * Git: slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.3.1-0
-
- -- Juho Son <juho80.son@samsung.com>  Mon, 23 Jul 2012 13:30:00 +0900
-sys-assert (0.3.0-4) unstable; urgency=low
-
-  * modified changelog.
-  * Git: slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.3.0-4
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 30 May 2012 20:30:26 +0900
-
-sys-assert (0.3.0-3) unstable; urgency=low
-
-  * modfied chown /opt/share/hidden_storage.
-  * Git: slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.3.0-3
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 30 May 2012 14:27:38 +0900
-
-sys-assert (0.3.0-2) unstable; urgency=low
-
-  * modified remove path api.
-  * Git: slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.3.0-2
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Fri, 16 Mar 2012 10:00:00 +0900
-
-sys-assert (0.3.0-1) unstable; urgency=low
-
-  * removed bluescreen, bluescreen-viewer.
-  * Git: slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.3.0-1
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Fri, 16 Dec 2011 11:40:00 +0900
-
-sys-assert (0.3.0-0) unstable; urgency=low
-
-  * changed git
-  * Git: slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.3.0-0
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 08 Dec 2011 11:40:00 +0900
-
-sys-assert (0.2.113) unstable; urgency=low
-
-  * modified backkey icon
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.113
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Tue, 06 Dec 2011 11:40:00 +0900
-
-sys-assert (0.2.112) unstable; urgency=low
-
-  * modified boilerplate
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.112
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Fri, 02 Dec 2011 11:40:00 +0900
-
-sys-assert (0.2.111) unstable; urgency=low
-
-  * added code in postinst for dbg package
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.111
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 30 Nov 2011 11:40:00 +0900
-
-sys-assert (0.2.110) unstable; urgency=low
-
-  * modfied lockupinfo sh and code
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.110
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 28 Nov 2011 11:40:00 +0900
-
-sys-assert (0.2.109) unstable; urgency=low
-
-  * modfied directory permission in lockupinfo
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.109
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 28 Nov 2011 11:30:00 +0900
-
-sys-assert (0.2.108) unstable; urgency=low
-
-  * modified lockupinfo which is requested by windowteam
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.108
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 23 Nov 2011 11:30:00 +0900
-
-sys-assert (0.2.107) unstable; urgency=low
-
-  * changed root directory from /opt/media to /opt/share/hidden_storage
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.107
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Fri, 18 Nov 2011 11:30:00 +0900
-
-sys-assert (0.2.106) unstable; urgency=low
-
-  * modified controlbar
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.106
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 16 Nov 2011 11:30:00 +0900
-
-sys-assert (0.2.105) unstable; urgency=low
-
-  * open controlbar at first view
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.105
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Fri, 09 Nov 2011 11:30:00 +0900
-
-sys-assert (0.2.104) unstable; urgency=low
-
-  * added pthread cancel in terminate api
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.104
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Fri, 28 Oct 2011 11:30:00 +0900
-
-sys-assert (0.2.103) unstable; urgency=low
-
-  * modified bluescreen viewer ui and function
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.103
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Fri, 28 Oct 2011 11:00:00 +0900
-
-sys-assert (0.2.102) unstable; urgency=low
-
-  * deleted timeout while sending because of big size
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.102
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 20 Oct 2011 11:00:00 +0900
-
-sys-assert (0.2.101) unstable; urgency=low
-
-  * modified printf format for wifi progress
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.101
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 20 Oct 2011 10:00:00 +0900
-
-sys-assert (0.2.100) unstable; urgency=low
-
-  * added progress status while sending via wifi
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.100
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 20 Oct 2011 09:00:00 +0900
-
-sys-assert (0.2.99) unstable; urgency=low
-
-  * fixed double touch send via, modified tar naming rule
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.99
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 19 Oct 2011 09:00:00 +0900
-
-sys-assert (0.2.98) unstable; urgency=low
-
-  * modified timeout and added code from window team
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.98
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Tue, 18 Oct 2011 09:00:00 +0900
-
-sys-assert (0.2.97) unstable; urgency=low
-
-  * modified url and progress ui
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.97
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Mon, 17 Oct 2011 09:00:00 +0900
-
-sys-assert (0.2.96) unstable; urgency=low
-
-  * added build string in callstack
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.96
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 12 Oct 2011 11:00:00 +0900
-
-sys-assert (0.2.95) unstable; urgency=low
-
-  * fixed: add flag between app create and app reset not to exit while threading
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.95
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 12 Oct 2011 10:00:00 +0900
-
-sys-assert (0.2.94) unstable; urgency=low
-
-  * modified navi and indi relation
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.94
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 12 Oct 2011 09:00:00 +0900
-
-sys-assert (0.2.93) unstable; urgency=low
-
-  * modified navi resolution
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.93
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Tue, 11 Oct 2011 11:00:00 +0900
-
-sys-assert (0.2.92) unstable; urgency=low
-
-  * modified from navigationbar to naviframe
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.92
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Mon, 10 Oct 2011 11:00:00 +0900
-
-sys-assert (0.2.91) unstable; urgency=low
-
-  * modified resolution 720 * 1280
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.91
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Mon, 10 Oct 2011 10:00:00 +0900
-
-sys-assert (0.2.90) unstable; urgency=low
-
-  * added files (/opt/etc/.debugmode, /etc/udev/rules.d/92-rb-dump.rules)
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.90
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 22 Sep 2011 09:00:00 +0900
-
-sys-assert (0.2.89) unstable; urgency=low
-
-  * added modified code
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.89
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 22 Sep 2011 09:00:00 +0900
-
-sys-assert (0.2.88) unstable; urgency=low
-
-  * delete network library
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.88
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 16 Sep 2011 09:00:00 +0900
-
-sys-assert (0.2.87) unstable; urgency=low
-
-  * added code(make log) frome window team 3
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.87
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 16 Sep 2011 09:00:00 +0900
-
-sys-assert (0.2.86) unstable; urgency=low
-
-  * added code(make log) frome window team 2
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.86
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 16 Sep 2011 09:00:00 +0900
-
-sys-assert (0.2.85) unstable; urgency=low
-
-  * added code(make log) frome window team 1
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.85
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 16 Sep 2011 09:00:00 +0900
-
-sys-assert (0.2.84) unstable; urgency=low
-
-  * removed dnet library
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.84
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 15 Sep 2011 09:00:00 +0900
-
-sys-assert (0.2.83) unstable; urgency=low
-
-  * added apache license
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.83
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Mon, 5 Sep 2011 09:00:00 +0900
-
-sys-assert (0.2.82) unstable; urgency=low
-
-  * added license
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.82
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Tue, 23 Aug 2011 18:15:17 +0900
-
-sys-assert (0.2.81) unstable; urgency=low
-
-  * added data(home directory) path
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.81
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Mon, 22 Aug 2011 18:15:17 +0900
-
-sys-assert (0.2.80) unstable; urgency=low
-
-  * fixed back key error
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.80
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 4 Jul 2011 18:15:17 +0900
-
-sys-assert (0.2.79) unstable; urgency=low
-
-  * added back sorfkey
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.79
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 3 Jul 2011 18:15:17 +0900
-
-sys-assert (0.2.78) unstable; urgency=low
-
-  * applied code cleanup
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.78
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Wed, 27 Jul 2011 18:15:17 +0900
-
-sys-assert (0.2.77) unstable; urgency=low
-
-  * modified genlist style name from 2line_textonly to 2text.2
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.77
-
- -- Jeesun Kim <iamjs.kim@samsung.com>  Thu, 23 Jun 2011 18:15:17 +0900
-
-sys-assert (0.2.76) unstable; urgency=low
-
-  * change pending_list to list_process due to cpu %
-  * add checking argv[1], argv[2]
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.76
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 28 Apr 2011 23:15:17 +0900
-
-sys-assert (0.2.75) unstable; urgency=low
-
-  * package name modification - "deb." prefix removal
-  * remove white space in source code
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.75
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 12 Apr 2011 14:34:28 +0900
-
-sys-assert (0.2.74) unstable; urgency=low
-
-  * fix problem occured when trying to send on not connected status
-  * add sqlite error message
-  * fix readlink problem in add_callstack_info
-  * add dlog
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.74
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 07 Apr 2011 21:43:01 +0900
-
-sys-assert (0.2.73) unstable; urgency=low
-
-  * add pkgconfig file of gthread-2.0 to blue-screen/CMakefile
-  * save dlog above debug priority when crash occurs
-  * fix buf in add_callstack_info
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.73
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 06 Apr 2011 16:28:33 +0900
-
-sys-assert (0.2.72) unstable; urgency=low
-
-  * fix path of /opt/var/log/dlog
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.72
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 04 Apr 2011 20:39:52 +0900
-
-sys-assert (0.2.71) unstable; urgency=low
-
-  * copy /opt/var/log/dlog* to debug directory
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.71
-
- -- root <yk.yun@samsung.com>  Mon, 28 Mar 2011 20:28:39 +0900
-
-sys-assert (0.2.70) unstable; urgency=low
-
-  * fix bug : crash when touch back button
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.70
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 22 Mar 2011 00:41:59 +0900
-
-sys-assert (0.2.69) unstable; urgency=low
-
-  * remove setup_bs.sh. debug mode setting script runs in rc.sysinit
-  * fix bug : crash when try uploading even if file size is 0
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.69
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 11 Mar 2011 19:33:42 +0900
-
-sys-assert (0.2.68) unstable; urgency=low
-
-  * fix bug : crash when compressing popup ends
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.68
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 10 Mar 2011 18:45:47 +0900
-
-sys-assert (0.2.67) unstable; urgency=low
-
-  * use pmapi to prevent sleep mode when making crash files
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.67
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 09 Mar 2011 20:36:38 +0900
-
-sys-assert (0.2.66) unstable; urgency=low
-
-  * fix twice call of ecore_edler_del
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.66
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 08 Mar 2011 23:17:00 +0900
-
-sys-assert (0.2.65) unstable; urgency=low
-
-  * add_package_info() add pakcage info to cs file
-  * set dumpable in sighandler to ensure generating core dump (0.2.64)
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.65
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 08 Mar 2011 13:44:03 +0900
-
-sys-assert (0.2.64) unstable; urgency=low
-
-  * add thread for move files and compress files
-  * Add missing pkg-config files for gcc 4.5
-  * fix end key popup
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.64
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 07 Mar 2011 19:40:09 +0900
-
-sys-assert (0.2.63) unstable; urgency=low
-
-  * change to use FTP when crash upload
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.63
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 03 Mar 2011 21:05:33 +0900
-
-sys-assert (0.2.62) unstable; urgency=low
-
-  * fix dli_fname which returned by dladdr when process is launched by launchpad
-  * remove unneeded stat and change sqlite3_open to sqlite3_open_v2 to open DB by read only mode
-  * change icon of bs-viewer and fix up path of bs-viewer
-  * add yk.yun to maintainer
-  * fix for prevent
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.62
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 14 Feb 2011 20:56:59 +0900
-
-sys-assert (0.2.61) unstable; urgency=low
-
-  * change symbol DB path to /opt/share/symbol.db
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.61
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 19 Jan 2011 14:43:32 +0900
-
-sys-assert (0.2.60) unstable; urgency=low
-
-  * use symbo DB for callstack ( add_callstack_info() )
-  * remove elm_popup_rotation_set api
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.60
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 12 Jan 2011 23:32:17 +0900
-
-sys-assert (0.2.59) unstable; urgency=low
-
-  * bug fix : show callstack even if there is no result from backtrace()
-  * add compress success popup
-  * fix structure of displaying popup
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.59
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 20 Dec 2010 20:11:58 +0900
-
-sys-assert (0.2.58) unstable; urgency=low
-
-  * enable sending via 3g network
-  * fix CMakeList.txt
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.58
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 16 Dec 2010 00:26:24 +0900
-
-sys-assert (0.2.57) unstable; urgency=low
-
-  * prepare code for sending via 3g network
-  * fix message of popup
-  * add depedency to vconf
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.57
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 14 Dec 2010 21:11:59 +0900
-
-sys-assert (0.2.56) unstable; urgency=low
-
-  * remove wifi-ug dependency
-  * add crash_logger_send_by_dnet.c for send via 3g
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.56
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 10 Dec 2010 20:12:33 +0900
-
-sys-assert (0.2.55) unstable; urgency=low
-
-  * make send_cb to work in thread
-  * add progressive bar
-  * add bundle for wifi show alarm when not connected
-  * hide indicator in bs-viewer
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.55
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 07 Dec 2010 21:45:16 +0900
-
-sys-assert (0.2.54) unstable; urgency=low
-
-  * bug fix : remove SIGTERM detection
-  * apply pie option to lockupinfo and blue-screen
-  * use xinfo -xwd_topvwins displace of screenshot in lockupinfo
-  * Git: :slp/pkgs/s/sys-assert
-  * Tag: sys-assert_0.2.54
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 06 Dec 2010 11:00:10 +0900
-
-sys-assert (0.2.53) unstable; urgency=low
-
-  * bug fix : problem with get_localtime.
-  * change text of send button to send via Wi-Fi
-  * change text of send button in wifi ug to start sending
-  * change time of displaying popup after send file to 4 sec
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.53
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 01 Dec 2010 18:16:01 +0900
-
-sys-assert (0.2.52) unstable; urgency=low
-
-  * fix nil/nil. ensure pc and lr value in callstack
-  * add result popup message after sending log via WIFI
-  * apply pie option to bs-viewer
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.52
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 26 Nov 2010 04:25:32 +0900
-
-sys-assert (0.2.51) unstable; urgency=low
-
-  * change pkg name blue-screen to deb.com.samsung.blue-screen
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.51
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 24 Nov 2010 21:33:34 +0900
-
-sys-assert (0.2.50) unstable; urgency=low
-
-  * change debug directory to /opt/media/SLP_debug for support MTP
-  * disable send all button
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.50
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 18 Nov 2010 21:14:09 +0900
-
-sys-assert (0.2.49) unstable; urgency=low
-
-  * change string of button displayed in wifi UG
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.49
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 12 Nov 2010 14:38:22 +0900
-
-sys-assert (0.2.48) unstable; urgency=low
-
-  * add feature : send via wifi, use wifi UG
-  * create directory when launch lockup info
-  * disable print maps information on bluescreen for performance
-  * remove warnings
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.48
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 11 Nov 2010 16:35:13 +0900
-
-sys-assert (0.2.47) unstable; urgency=low
-
-  * copy pre.Xorg* log when bluescreen occurs
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.47
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 29 Oct 2010 16:42:33 +0900
-
-sys-assert (0.2.46) unstable; urgency=low
-
-  * fix rename core dump problem. change renmae to mv
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.46
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 27 Oct 2010 22:18:04 +0900
-
-sys-assert (0.2.45) unstable; urgency=low
-
-  * change chown in libsys-assert-0.postinst
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.45
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 27 Oct 2010 18:49:32 +0900
-
-sys-assert (0.2.44) unstable; urgency=low
-
-  * remove send_log and add save_crash
-  * remove send/send_all button
-  * chagne CRASHLOG_DIR crash/files to crash/send
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.44
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 27 Oct 2010 15:43:22 +0900
-
-sys-assert (0.2.43) unstable; urgency=low
-
-  * change core_patter to /opt/bs/core/
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.43
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 26 Oct 2010 22:51:31 +0900
-
-sys-assert (0.2.42) unstable; urgency=low
-
-  * add showing timestamp when run dlogutl
-  * copy nand log
-  * change core_patter to /opt/bs/
-  * create /opt/media/.tmp/debug
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.42
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 26 Oct 2010 20:22:58 +0900
-
-sys-assert (0.2.41) unstable; urgency=low
-
-  * fix time value in lockupinfo
-  * add lockupinfo feature : copying kernel log, dlog etc
-  * bug fix : copy Xorg log
-  * enable showing lockupinfo in bs-viewer
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.41
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 26 Oct 2010 17:41:17 +0900
-
-sys-assert (0.2.40) unstable; urgency=low
-
-  * bug fix : string sending popup
-  * create debug directory in postinst
-  * copy Xorg log when bluescreen launched
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.40
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 22 Oct 2010 20:53:42 +0900
-
-sys-assert (0.2.39) unstable; urgency=low
-
-  * bug fix : remove doule closedir in bs-viewer
-  * enable end key
-  * displace fork/execute BS in bs-viewer with using curbs.log
-  * add popup which show "sending files bra bra"
-  * directory change ( /opt/system/debug/bs to /opt/bs,
-    /opt/system/debug/crash to /opt/media/.tmp/debug/crash)
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.39
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 18 Oct 2010 20:09:52 +0900
-
-sys-assert (0.2.38) unstable; urgency=low
-
-  * make directory if /opt/media/.tmp is absent
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.38
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 15 Oct 2010 15:47:20 +0900
-
-sys-assert (0.2.37) unstable; urgency=low
-
-  * change debug directory /opt/system/debug to /opt/media/.tmp/debug
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.37
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 12 Oct 2010 17:18:15 +0900
-
-sys-assert (0.2.36) unstable; urgency=low
-
-  * enable end key
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.36
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 07 Oct 2010 19:06:22 +0900
-
-sys-assert (0.2.35) unstable; urgency=low
-
-  * add no list text no bs-viewer if there is no crash files
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.35
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 06 Oct 2010 15:26:08 +0900
-
-sys-assert (0.2.34) unstable; urgency=low
-
-  * chagne entry to label in bluescreen
-  * enable popup after touching send or send all
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.34
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 04 Oct 2010 18:53:21 +0900
-
-sys-assert (0.2.33) unstable; urgency=low
-
-  * disable context popup
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.33
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 01 Oct 2010 18:55:22 +0900
-
-sys-assert (0.2.32) unstable; urgency=low
-
-  * fix build error in new build system
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.32
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 30 Sep 2010 11:06:26 +0900
-
-sys-assert (0.2.31) unstable; urgency=low
-
-  * fix error in handling unprintable value
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.31
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 17 Sep 2010 21:31:11 +0900
-
-sys-assert (0.2.30) unstable; urgency=low
-
-  * add check routine for unprintable value in bluescreen
-  * if prctl(PR_GET_DUMPABLE) returns 0, print message in sighandler
-  * use duble fork to run send_log.sh
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.30
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 17 Sep 2010 20:55:40 +0900
-
-sys-assert (0.2.29) unstable; urgency=low
-
-  * efl upgrade
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.29
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Sat, 11 Sep 2010 18:53:24 +0900
-
-sys-assert (0.2.28) unstable; urgency=low
-
-  * remove legacy codes for avatar
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.28
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 03 Sep 2010 15:09:02 +0900
-
-sys-assert (0.2.27) unstable; urgency=low
-
-  * remove libsys-assert-dev pkg
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.27
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 27 Aug 2010 10:56:26 +0900
-
-sys-assert (0.2.26) unstable; urgency=low
-
-  * add extra errno
-  * fix up bs-viewer for launch properly
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.26
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 24 Aug 2010 16:17:52 +0900
-
-sys-assert (0.2.25) unstable; urgency=low
-
-  * change umaks to assure of file permission
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.25
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 17 Aug 2010 15:34:29 +0900
-
-sys-assert (0.2.24) unstable; urgency=low
-
-  * repackaging
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.24
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Sun, 15 Aug 2010 19:55:19 +0900
-
-sys-assert (0.2.23) unstable; urgency=low
-
-  * fix to move executing send_file after drawing
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.23
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Sun, 15 Aug 2010 19:35:36 +0900
-
-sys-assert (0.2.22) unstable; urgency=low
-
-  * modify file permission for creating crash directory
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.22
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 13 Aug 2010 16:45:17 +0900
-
-sys-assert (0.2.21) unstable; urgency=low
-
-  * blue-screen: use beat theme instead of kessler
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.21
-
- -- Wonguk Jeong <wonguk.jeong@samsung.com>  Tue, 10 Aug 2010 22:24:11 +0900
-
-sys-assert (0.2.20) unstable; urgency=low
-
-  * Modify file permisstion
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.20
-
- -- Sangjung Woo <sangjung.woo@samsung.com>  Mon, 09 Aug 2010 09:26:59 +0900
-
-sys-assert (0.2.19) unstable; urgency=low
-
-  * use new appcore
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.19
-
- -- Wonguk Jeong <wonguk.jeong@samsung.com>  Thu, 05 Aug 2010 09:26:59 +0900
-
-sys-assert (0.2.18) unstable; urgency=low
-
-  * fix the postinst script for security issue
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.18
-
- -- Sangjung Woo <sangjung.woo@samsung.com>  Mon, 2 Aug 2010 17:00:59 +0900
-
-sys-assert (0.2.17) unstable; urgency=low
-
-  * fix the directory and file permission for security issue
-  * Git: :/git/slp/pkgs/sys-assert
-  * Tag: sys-assert_0.2.17
-
- -- Sangjung Woo <sangjung.woo@samsung.com>  Mon, 2 Aug 2010 17:00:59 +0900
-
-sys-assert (0.2.16) unstable; urgency=low
-
-  * fix elm_object_disabled_set() to elm_entry_editable_set() in blue-screen/blue-screen.c
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.16
-
- -- Youmin Ha <youmin.ha@samsung.com>  Mon, 12 Jul 2010 10:20:59 +0900
-
-sys-assert (0.2.15-16) unstable; urgency=low
-
-  * change maintainer
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-16
-
- -- Youmin Ha <youmin.ha@samsung.com>  Thu, 08 Jul 2010 20:33:19 +0900
-
-sys-assert (0.2.15-15) unstable; urgency=low
-
-  * remove legacy dlog file dump
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-15
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 16 Jun 2010 11:46:55 +0900
-
-sys-assert (0.2.15-14) unstable; urgency=low
-
-  * fix error : send in blue-screen is not working when bs is launched by bs-bewer
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-14
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 11 Jun 2010 15:36:54 +0900
-
-sys-assert (0.2.15-13) unstable; urgency=low
-
-  * prevent app_terminate is called twice
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-13
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 11 Jun 2010 13:14:22 +0900
-
-sys-assert (0.2.15-12) unstable; urgency=low
-
-  * fix error
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-12
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 11 Jun 2010 12:09:06 +0900
-
-sys-assert (0.2.15-11) unstable; urgency=low
-
-  * repackaging
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-11
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 07 Jun 2010 10:55:44 +0900
-
-sys-assert (0.2.15-10) unstable; urgency=low
-
-  * add theme to fix error
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-10
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 07 Jun 2010 10:28:33 +0900
-
-sys-assert (0.2.15-9) unstable; urgency=low
-
-  * fix erro
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-9
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 03 Jun 2010 23:34:00 +0900
-
-sys-assert (0.2.15-8) unstable; urgency=low
-
-  * remove deprecated api
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-8
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 03 Jun 2010 20:27:10 +0900
-
-sys-assert (0.2.15-7) unstable; urgency=low
-
-  * repackaging
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-7
-
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Sun, 23 May 2010 17:39:12 +0900
-
-sys-assert (0.2.15-6) unstable; urgency=low
-
-  * make bs window always on top
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-6
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 20 May 2010 14:20:22 +0900
-
-sys-assert (0.2.15-5) unstable; urgency=low
-
-  * fix postinst
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-5
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 19 May 2010 15:50:55 +0900
-
-sys-assert (0.2.15-4) unstable; urgency=low
-
-  * BUG FIX : string in INOTIFY_BS is not correct. so add O_APPEND
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-4
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 03 May 2010 14:37:35 +0900
-
-sys-assert (0.2.15-3) unstable; urgency=low
-
-  * BUG FIX : problem occurs when making ramdump file because of buffer overflow. so change PATH_LEN 128 to 256
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-3
-
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 28 Apr 2010 15:16:52 +0900
-
-sys-assert (0.2.15-2) unstable; urgency=low
-
-  * add time infomation to ramdump file
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-2
-
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 26 Apr 2010 20:07:13 +0900
-
-sys-assert (0.2.15-1) unstable; urgency=low
-
-  * delete unneeded codes in trace_symbols()
-  * add sys-assert-0.postinst
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-1
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 20 Apr 2010 11:38:26 +0900
-
-sys-assert (0.2.15-0) unstable; urgency=low
-
-  * add register info
-  * get callstack using libc backtrace function
-  * fix trace symbol function
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.15-0
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 19 Apr 2010 15:01:51 +0900
-
-sys-assert (0.2.14-5) unstable; urgency=low
-
-  * add message when PURPLE screen displayed
-  * add dbg package
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.14-5
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 14 Apr 2010 20:38:46 +0900
-
-sys-assert (0.2.14-4) unstable; urgency=low
-
-  * repacking
-  * Git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert_0.2.14-4
-
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 12 Apr 2010 22:16:33 +0900
-
-sys-assert (0.2.14-3) unstable; urgency=low
-
-  * repacking
-  * git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert-0_0.2.14-3
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 12 Apr 2010 22:03:06 +0900
-
-sys-assert (0.2.14-2) unstable; urgency=low
-
-  * repacking
-  * git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-asser_0.2.14-2
-
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 12 Apr 2010 21:49:55 +0900
-
-sys-assert (0.2.14-1) unstable; urgency=low
-
-  * repacking
-  * git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-asser_0.2.14-1
-
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 12 Apr 2010 21:34:49 +0900
-
-sys-assert (0.2.14-0) unstable; urgency=low
-
-  * fix appname, exepath for avatar-factory
-  * git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-asser_0.2.14-0
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 12 Apr 2010 20:18:42 +0900
-
-sys-assert (0.2.13-0) unstable; urgency=low
-
-  * add get_localtime to convert time_t value to struct tm
-  * fix for lockup ( remove fork/exec, system() call )
-  * git: :/git/slp2.0/slp2.0-pkgs/sys-assert-0
-  * Tag: sys-assert-0_0.2.13-0
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 02 Apr 2010 14:45:00 +0900
-
-sys-assert (0.2.12-6) unstable; urgency=low
-
-  * add setup_bs.sh for profile
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Sat, 27 Mar 2010 16:20:31 +0900
-
-sys-assert (0.2.12-5) unstable; urgency=low
-
-  * toolchain upgrade
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 25 Mar 2010 16:54:59 +0900
-
-sys-assert (0.2.12-4) unstable; urgency=low
-
-  * EFL update
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 16 Mar 2010 11:49:44 +0900
-
-sys-assert (0.2.12-3) unstable; urgency=low
-
-  * fix lockupinfo.sh
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 11 Mar 2010 09:54:24 +0900
-
-sys-assert (0.2.12-2) unstable; urgency=low
-
-  * add lockupinfo.sh
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 10 Mar 2010 20:45:44 +0900
-
-sys-assert (0.2.12-1) unstable; urgency=low
-
-  * add evas_object_how(ad->win_main) in app_init()
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 10 Mar 2010 18:25:06 +0900
-
-sys-assert (0.2.12-0) unstable; urgency=low
-
-  * change theme to use kessler
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 05 Mar 2010 16:52:33 +0900
-
-sys-assert (0.2.11-0) unstable; urgency=low
-
-  * add windows ping info, dump topvwins to lockupinfo
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 04 Mar 2010 23:00:24 +0900
-
-sys-assert (0.2.10-0) unstable; urgency=low
-
-  * Feature add : add ramdump to lockup
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 03 Mar 2010 21:45:19 +0900
-
-sys-assert (0.2.9-0) unstable; urgency=low
-
-  * Feature add : add popup when send button touched
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 03 Mar 2010 15:18:48 +0900
-
-sys-assert (0.2.8-0) unstable; urgency=low
-
-  * feature add : move telephony log to bs directory
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 24 Feb 2010 21:09:20 +0900
-
-sys-assert (0.2.7-0) unstable; urgency=low
-
-  * lockupinfo is added,  fix to do not show indicator when bs occurs
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 24 Feb 2010 15:32:17 +0900
-
-sys-assert (0.2.6-6) unstable; urgency=low
-
-  * purple screen is enabled
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 22 Feb 2010 11:28:53 +0900
-
-sys-assert (0.2.6-5) unstable; urgency=low
-
-  * BUG FIX : add clodedir for opened vip, permanent dir
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 17 Feb 2010 12:36:49 +0900
-
-sys-assert (0.2.6-4) unstable; urgency=low
-
-  * purple screen is disabled ( for MWC )
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 10 Feb 2010 17:18:03 +0900
-
-sys-assert (0.2.6-3) unstable; urgency=low
-
-  * purple screen is enabled
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 09 Feb 2010 23:24:29 +0900
-
-sys-assert (0.2.6-2) unstable; urgency=low
-
-  * purple screen is temporary disabled
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 09 Feb 2010 12:34:03 +0900
-
-sys-assert (0.2.6-1) unstable; urgency=low
-
-  * delete libui-softkey-0, TW3-softkey
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 08 Feb 2010 22:54:22 +0900
-
-sys-assert (0.2.6-0) unstable; urgency=low
-
-  * ADD FEATURE : Red/purple screen
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 08 Feb 2010 12:28:07 +0900
-
-sys-assert (0.2.5-0-1EFL+) unstable; urgency=low
-
-  * Reversion for -1EFL+
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 04 Feb 2010 14:58:07 +0900
-
-sys-assert (0.2.5-0) unstable; urgency=low
-
-  * change dbg directory to /opt/system/debug
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 02 Feb 2010 17:02:00 +0900
-
-sys-assert (0.2.4-0) unstable; urgency=low
-
-  * change winset API
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Sat, 30 Jan 2010 13:55:14 +0900
-
-sys-assert (0.2.3-1) unstable; urgency=low
-
-  * change path
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 29 Jan 2010 09:51:33 +0900
-
-sys-assert (0.2.3-0) unstable; urgency=low
-
-  * delete applog and change API using prefix "SLP_"
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 27 Jan 2010 09:59:42 +0900
-
-sys-assert (0.2.2-1) unstable; urgency=low
-
-  * rebuild for EFL upgrade
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Fri, 22 Jan 2010 14:57:33 +0900
-
-sys-assert (0.2.2-0) unstable; urgency=low
-
-  * sys-assert do not wait BS anymore, print FreeMem, Print package info, bug
-    fix : print last line repeated
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Thu, 21 Jan 2010 16:12:20 +0900
-
-sys-assert (0.2.1-1) unstable; urgency=low
-
-  * bug fix : support i686 build
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 20 Jan 2010 21:36:45 +0900
-
-sys-assert (0.2.1-0) unstable; urgency=low
-
-  * add bs-viewer , bug fix : segmentation error because of padding size
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 19 Jan 2010 12:12:57 +0900
-
-sys-assert (0.2.0-2) unstable; urgency=low
-
-  * bug fix : libsys-assert-dev missing files (/usr/lib/libsys-assert*.la)
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 06 Jan 2010 19:43:40 +0900
-
-sys-assert (0.2.0-0) unstable; urgency=low
-
-  * add blue screen pkg
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Wed, 06 Jan 2010 19:19:42 +0900
-
-sys-assert (0.1.1-0) unstable; urgency=low
-
-  * Add information
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Tue, 05 Jan 2010 16:32:16 +0900
-
-sys-assert (0.1.0-0) unstable; urgency=low
-
-  * Initial Release.
-
- -- Youngkyeong Yun <yk.yun@samsung.com>  Mon, 29 Dec 2009 16:38:38 +0900
diff --git a/debian/compat b/debian/compat
deleted file mode 100644 (file)
index 7ed6ff8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/control b/debian/control
deleted file mode 100644 (file)
index 353a3ae..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Source: sys-assert
-Section: devel
-Priority: extra
-Maintainer: Youngjoo Park <yjoo93.park@samsung.com>, Youngkyeong Yun <yk.yun@samsung.com>
-Uploaders: Jeesun Kim <iamjs.kim@samsung.com> Youngkyeong Yun <yk.yun@samsung.com>
-Build-Depends: debhelper (>= 5), autotools-dev, libappcore-efl-dev, libheynoti-dev, libelm-dev, libslp-utilx-dev, libui-gadget-dev, libbundle-dev, libglib2.0-dev, libslp-setting-dev, libsqlite3-dev, libslp-pm-dev, dlog-dev, libslp-sysman-dev
-Standards-Version: 0.1.0
-
-Package: libsys-assert-0
-Section: libs
-Architecture: any
-Depends: 
-Description: libsys-assert (shared object)
-
-Package: sys-assert-0-dbg
-Section: debug
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libsys-assert-0
-Description: libsys-assert dbg package
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644 (file)
index 4f93c69..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the Apache License version 2.0.
-
-The full text of the Apache 2.0 can be found in
-/usr/share/common-licenses.
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644 (file)
index ca882bb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/sbin
diff --git a/debian/docs b/debian/docs
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/debian/libsys-assert-0.install.in b/debian/libsys-assert-0.install.in
deleted file mode 100755 (executable)
index fba661e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-@PREFIX@/bin/lockupinfo
-@PREFIX@/bin/lockupinfo.sh
-
-@PREFIX@/lib/libsys-assert*.so*
-/etc/udev/rules.d/92-rb-dump.rules
-/opt/etc/.debugmode
diff --git a/debian/libsys-assert-0.postinst b/debian/libsys-assert-0.postinst
deleted file mode 100644 (file)
index c828a2f..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-# if [ ${USER} == "root" ]
-# then
-   # Change file owner
-   # 1. libraries
-   # chown root:root /usr/lib/libsys-assert.so
-   # 2. executables
-   # 3. configurations
-   # 4. profile script
-   # chown root:root /etc/profile.d/setup_bs.sh
-
-#fi
-# Change file permissions
-# 1. libraries
-# chmod 644 /usr/lib/libsys-assert.so
-# 2. executables
-# 3. configurations
-# 4. booting script
-
-if [ -d /opt/bs ]
-then
-       if [ -d /opt/bs/core ]
-       then
-               echo "/opt/bs/core exists"
-       else
-               mkdir /opt/bs/core
-               chown root:5000 /opt/bs/core
-               chmod 775 /opt/bs/core
-       fi
-else
-       mkdir -p /opt/bs/core
-       chown root:5000 /opt/bs/core
-       chmod 775 /opt/bs/core
-fi
-
-if [ -d /opt/share/hidden_storage ]
-then
-       if [ -d /opt/share/hidden_storage/SLP_debug ]
-       then
-               echo "/opt/share/hidden_storage/SLP_debug exists"
-       else
-               mkdir /opt/share/hidden_storage/SLP_debug
-               chown root:5000 /opt/share/hidden_storage/SLP_debug
-               chmod 775 /opt/share/hidden_storage/SLP_debug
-       fi
-else
-       mkdir -p /opt/share/hidden_storage/SLP_debug
-       chown root:5000 /opt/share/hidden_storage
-       chmod 775 /opt/share/hidden_storage
-       chown root:5000 /opt/share/hidden_storage/SLP_debug
-       chmod 775 /opt/share/hidden_storage/SLP_debug
-fi
-
-touch /opt/etc/.debugmode
-
-# added below for dbg package
-DBG_DIR=/home/developer/sdk_tools/usr/lib/debug
-
-if [ -L /usr/lib/debug ]
-then
-       echo "already exists"
-       exit
-fi
-
-mkdir -p ${DBG_DIR}
-if [ -d /usr/lib/debug ]
-then
-       cp -a /usr/lib/debug/* ${DBG_DIR}
-       rm -rf /usr/lib/debug
-fi
-
-ln -sf ${DBG_DIR} /usr/lib/debug
diff --git a/debian/org.tizen.blue-screen.install.in b/debian/org.tizen.blue-screen.install.in
deleted file mode 100755 (executable)
index c3f0668..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-@PREFIX@/bin/blue-screen
-@PREFIX@/share/edje/*
-#@PREFIX@/share/edje/blue-screen.edj
-#@PREFIX@/share/edje/bs-viewer.edj
-@PREFIX@/bin/lockupinfo
-@PREFIX@/bin/lockupinfo.sh
-#@PREFIX@/bin/crashuploader
-/opt/share/applications/*
-#/opt/share/applications/org.tizen.bs-viewer.desktop
-/opt/apps/org.tizen.blue-screen/data
-/opt/apps/org.tizen.blue-screen/bin/bs-viewer
-/opt/apps/org.tizen.blue-screen/res/images/*
-/opt/apps/org.tizen.blue-screen/res/icons/default/small/org.tizen.blue-screen.png
-#/opt/bs/debuglevel/*
diff --git a/debian/rules b/debian/rules
deleted file mode 100755 (executable)
index 51650aa..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-CFLAGS ?= -Wall -g
-CXXFLAGS ?=  -Wall -g
-LDFLAGS ?=
-PREFIX ?= /usr
-DATADIR ?= /opt
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-        BUILD_TYPE=Debug
-else
-        BUILD_TYPE=Release
-endif
-
-LDFLAGS += -Wl,--as-needed
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-       CXXFLAGS += -O0
-else
-       CFLAGS += -O2
-       CXXFLAGS += -O2
-endif
-
-#LDFLAGS +=
-
-CFLAGS += -fPIC
-
-CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
-
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-       # Add here commands to configure the package.
-       mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
-       CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX="$(PREFIX)" -DCMAKE_BUILD_TYPE="$(BUILD_TYPE)"
-
-       touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp
-       dh_testdir
-
-       # Add here commands to compile the package.
-       cd $(CMAKE_BUILD_DIR) && $(MAKE)
-
-       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
-               cat $$f > $${f%.in}; \
-               sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
-               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
-       done
-
-       touch $@
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp
-
-       # Add here commands to clean up after the build process.
-       rm -rf $(CMAKE_BUILD_DIR)
-
-       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
-               rm -f $${f%.in}; \
-       done
-
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-#      dh_installdirs
-
-       # Add here commands to install the package into debian/wavplayer.
-       cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs
-#      dh_installdocs
-       dh_installexamples
-       dh_install --sourcedir=debian/tmp
-#      dh_installmenu
-#      dh_installdebconf
-#      dh_installlogrotate
-#      dh_installemacsen
-#      dh_installpam
-#      dh_installmime
-#      dh_python
-#      dh_installinit
-#      dh_installcron
-#      dh_installinfo
-       dh_installman
-       dh_link
-       dh_strip --dbg-package=sys-assert-0-dbg
-       dh_compress
-       dh_fixperms
-#      dh_perl
-       dh_makeshlibs
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/lockupinfo/92-rb-dump.rules b/lockupinfo/92-rb-dump.rules
deleted file mode 100644 (file)
index 685496a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-#RB_DUMP
-ACTION=="change" DEVPATH=="/devices/platform/samsung_input_bridge", ENV{RB_DUMP}=="ON" RUN+="/usr/bin/lockupinfo.sh"
diff --git a/lockupinfo/CMakeLists.txt b/lockupinfo/CMakeLists.txt
deleted file mode 100644 (file)
index 33ab804..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(lockupinfo C)
-
-SET(PROJECT_NAME "lockupinfo")
-SET(SRCS lockupinfo.c)
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs-common REQUIRED)
-
-FOREACH(flag ${pkgs-common_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fpie")
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-SET(CMAKE_C_FLAGS_RELEASE "-O2")
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
-       ADD_DEFINITIONS("-DTARGET")
-       MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-ADD_DEFINITIONS("-DEAPI")
-ADD_DEFINITIONS("-DDEBUG_ON")
-ADD_DEFINITIONS("-DLCD_TYPE_WVGA")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
-
-ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs-common_LDFLAGS})
-
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/lockupinfo.sh DESTINATION bin)
-
-#install in default files for lockup key combination
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/92-rb-dump.rules DESTINATION /etc/udev/rules.d)
diff --git a/lockupinfo/_util_log.h b/lockupinfo/_util_log.h
deleted file mode 100644 (file)
index 916410b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-
-/*
- *  LOCKUPINFO
- *
- * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jeesun Kim <iamjs.kim@samsung.com>
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __LOCKUPINFO_UTIL_LOG_H__
-#define __LOCKUPINFO_UTIL_LOG_H__
-
-#include <unistd.h>
-//#include <dlog.h>
-
-#undef LOG_TAG
-#define LOG_TAG "LOCKUPINFO"
-#define _E(fmt, arg...) fprintf(stderr, "[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg)
-#define _D(fmt, arg...) fprintf(stderr, "[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg)
-//#define _E(fmt, arg...) LOGE("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg)
-//#define _D(fmt, arg...) LOGD("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg)
-
-#define retvm_if(expr, val, fmt, arg...) do { \
-       if(expr) { \
-               _E(fmt, ##arg); \
-               _E("(%s) -> %s() return", #expr, __FUNCTION__); \
-               return (val); \
-       } \
-} while (0)
-
-#define retv_if(expr, val) do { \
-       if(expr) { \
-               _E("(%s) -> %s() return", #expr, __FUNCTION__); \
-               return (val); \
-       } \
-} while (0)
-
-#define retm_if(expr, fmt, arg...) do { \
-       if(expr) { \
-               _E(fmt, ##arg); \
-               _E("(%s) -> %s() return", #expr, __FUNCTION__); \
-               return; \
-       } \
-} while (0)
-
-#define ret_if(expr) do { \
-       if(expr) { \
-               _E("(%s) -> %s() return", #expr, __FUNCTION__); \
-               return; \
-       } \
-} while (0)
-
-
-#endif                         /* __LOCKUPINFO_UTIL_LOG_H__ */
diff --git a/lockupinfo/lockupinfo.c b/lockupinfo/lockupinfo.c
deleted file mode 100644 (file)
index 00a75c1..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-
-/*
- *  LOCKUPINFO
- *
- * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jeesun Kim <iamjs.kim@samsung.com>
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <time.h>
-
-#include "_util_log.h"
-
-#define VERINFO_PATH "/etc/info.ini"
-#define DEBUG_DIR "/opt/share/hidden_storage/SLP_debug"
-#define PATH_LEN 256
-#define BUF_SIZE 256
-#define PERMS 0755
-#define FILE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
-
-/* lockupinfo launch key combination: 
- * 1. volume side key up
- * 2. volume side key down
- * 3. home key
- * 4. home key
- * 5. volume side key up
- * 6. volume side key down
- * 7. volume side key up
- * 8. home key
- */
-
-/* WARNING : formatted string buffer is limited to 1024 byte */
-int fprintf_fd(int fd, const char *fmt, ...)
-{
-       int n;
-       char buff[1024];
-       va_list args;
-       va_start(args, fmt);
-       n = vsnprintf(buff, 1024 - 1, fmt, args);
-       write(fd, buff, n);
-       va_end(args);
-       return n;
-}
-
-char *fgets_fd(char *s, int n, int fd)
-{
-       char c;
-       register char *cs;
-       int num = 0;
-
-       cs = s;
-       while (--n > 0 && (num = read(fd, &c, 1) > 0)) {
-               if ((*cs++ = c) == '\n')
-                       break;
-       }
-       *cs = '\0';
-       return (num == 0 && cs == s) ? NULL : s;
-}
-
-int main()
-{
-       char lbuf[BUF_SIZE];
-       char name[32] = {0, };
-       char size[32] = {0, };
-       char unit[32] = {0, };
-       int csfd;
-       int tmpfd;
-       int meminfo;
-       int verinfo;
-
-       fprintf(stderr, "[lockupinfo] executed\n");
-
-       /* get time  */
-       time_t cur_time;
-       struct tm ctime;
-       cur_time = time(NULL);
-       localtime_r(&cur_time, &ctime);
-
-       char nbuf[256] = {0, }; /* name buf */
-       char dbuf[256] = {0, }; /* dir buf */
-       char ibuf[256] = {0, }; /* info buf */
-       char cbuf[256] = {0, }; /* cmd buf */
-       char tbuf[256] = {0, }; /* temp buf */
-       int ret;
-
-//     snprintf(nbuf, sizeof(nbuf), "debuginfo_%02d%02d%02d%02d%02d%02d",
-//                     ctime->tm_year, ctime->tm_mon, ctime->tm_mday,
-//                     ctime->tm_hour, ctime->tm_min, ctime->tm_sec);
-
-       strftime(tbuf, sizeof(tbuf), "%Y%m%d%H%M%S", &ctime);
-       snprintf(nbuf, sizeof(nbuf), "debuginfo_%s", tbuf);
-
-       /* make debug directory if absent */
-       ret = access(DEBUG_DIR, F_OK);
-       if (ret < 0) {
-               if (ret = mkdir(DEBUG_DIR, PERMS) < 0) {
-                       _E("Failed to mkdir %s(errno:%d)\n", DEBUG_DIR, ret);
-                       return -1;
-               }
-       }
-
-       snprintf(dbuf, sizeof(dbuf), "%s/%s", DEBUG_DIR, nbuf);
-       ret = mkdir(dbuf, PERMS);
-       retvm_if(ret < 0, -1, "Failed to mkdir %s(errno:%d)\n", dbuf, ret);
-
-       snprintf(dbuf, sizeof(dbuf), "%s/%s/%s", DEBUG_DIR, nbuf, "files");
-       ret = mkdir(dbuf, PERMS);
-       retvm_if(ret < 0, -1, "Failed to mkdir %s(errno:%d)\n", dbuf, ret);
-       _D("lockupinfo dir [%s]\n", dbuf);
-
-       snprintf(ibuf, sizeof(ibuf), "%s/%s.info", dbuf, nbuf);
-
-       /* create .info file */
-       csfd = creat(ibuf, FILE_PERMS);
-       retvm_if(csfd < 0, -1, "Failed to creat %s\n", ibuf);
-
-       /* print version info */
-       fprintf_fd(csfd, "******************************\n");
-       fprintf_fd(csfd, "s/w version\n");
-       fprintf_fd(csfd, "******************************\n");
-
-       verinfo = open(VERINFO_PATH, O_RDONLY);
-       if (verinfo < 0) {
-               _E("Failed to open %s\n", VERINFO_PATH);
-
-       } else {
-               while (fgets_fd(lbuf, BUF_SIZE, verinfo)) {
-                       if (strncmp("Major=", lbuf, 6) == 0) {
-                               fprintf_fd(csfd, "%s", lbuf);
-
-                       } else if (strncmp("Minor=", lbuf, 6) == 0) {
-                               fprintf_fd(csfd, "%s", lbuf);
-
-                       } else if (strncmp("Date=", lbuf, 5) == 0) {
-                               fprintf_fd(csfd, "%s", lbuf);
-
-                       } else if (strncmp("Time=", lbuf, 5) == 0) {
-                               fprintf_fd(csfd, "%s", lbuf);
-                               break;
-                       }
-               }
-               close(verinfo);
-
-       }
-
-       /* print mem info */
-       meminfo = open("/proc/meminfo", O_RDONLY);
-       if (meminfo < 0) {
-               _E("Failed to open %s\n", "/proc/meminfo");
-
-       } else {
-               fprintf_fd(csfd, "*******************************\n");
-               fprintf_fd(csfd, "Mem information\n");
-               fprintf_fd(csfd, "*******************************\n");
-
-               while (fgets_fd(lbuf, BUF_SIZE, meminfo) != NULL) {
-                       sscanf(lbuf, "%s %s %s", name, size, unit);
-
-                       if (strcmp("MemTotal:", name) == 0) {
-                               fprintf_fd(csfd, "%s\t%10.0d %s\n", name, atoi(size), unit);
-
-                       } else if (strcmp("MemFree:", name) == 0) {
-                               fprintf_fd(csfd, "%s\t%10.0d %s\n", name, atoi(size), unit);
-
-                       } else if (strcmp("Buffers:", name) == 0) {
-                               fprintf_fd(csfd, "%s\t%10.0d %s\n", name, atoi(size), unit);
-
-                       } else if (strcmp("Cached:", name) == 0) {
-                               fprintf_fd(csfd, "%s\t%10.0d %s\n", name, atoi(size), unit);
-
-                       }
-               }
-               close(meminfo);
-       }
-
-       /* ps info */
-       snprintf(cbuf, sizeof(cbuf), "%s > %s",
-                       "ps ax -o pid,tid,ppid,f,stat,pcpu,pmem,wchan,command", "/tmp/ps_tmp.log");
-       system(cbuf);
-
-       tmpfd = open("/tmp/ps_tmp.log", O_RDONLY);
-       if (tmpfd < 0) {
-               _E("Failed to open %s\n", "/tmp/ps_tmp.log");
-       } else {
-               fprintf_fd(csfd, "*******************************\n");
-               fprintf_fd(csfd, "PS information\n");
-               fprintf_fd(csfd, "*******************************\n");
-
-               while (fgets_fd(lbuf, BUF_SIZE, tmpfd) != NULL) {
-                       fprintf_fd(csfd, "%s", lbuf);
-               }
-               close(tmpfd);
-               unlink("/tmp/ps_tmp.log");
-       }
-
-       /* ping info */
-       snprintf(cbuf, sizeof(cbuf), "%s 2> %s",
-                       "xinfo -p", "/tmp/ping_tmp.log");
-       system(cbuf);
-
-       if ((tmpfd = open("/tmp/ping_tmp.log", O_RDONLY)) < 0) {
-               fprintf(stderr, "[lockupinfo]can't open %s\n",
-                       "/tmp/ping_tmp.log");
-       } else {
-               fprintf_fd(csfd, "*******************************\n");
-               fprintf_fd(csfd, "ping test for all top level windows\n");
-               fprintf_fd(csfd, "*******************************\n");
-
-               while (fgets_fd(lbuf, BUF_SIZE, tmpfd)) {
-                       fprintf_fd(csfd, "%s", lbuf);
-               }
-               close(tmpfd);
-               unlink("/tmp/ping_tmp.log");
-       }
-
-       /* dump topvwins */
-       snprintf(cbuf, sizeof(cbuf), "%s %s",
-                       "/usr/bin/xinfo -xwd_topvwins", dbuf);
-       system(cbuf);
-
-       /* close lockupinfoXXXX.info */
-       close(csfd);
-
-       snprintf(cbuf, sizeof(cbuf), "%s %s/%s.info %s/%s/%s.cs",
-                       "cp", dbuf, nbuf, DEBUG_DIR, nbuf, nbuf);
-       system(cbuf);
-
-
-
-       /* make dlog file */
-       snprintf(tbuf, sizeof(tbuf), "%s/%s", dbuf, "main.log");
-       snprintf(cbuf, sizeof(cbuf), "dlogutil -v time -d -f %s *:v", tbuf);
-       system(cbuf);
-
-       snprintf(tbuf, sizeof(tbuf), "%s/radio.log", dbuf);
-       fprintf(stderr, "radio log path = %s\n", tbuf);
-       snprintf(cbuf, sizeof(cbuf), "dlogutil -v time -b radio -d -f %s *:v", tbuf);
-       system(cbuf);
-
-
-       /* dump window manager info 
-        * this code came from window team
-        */
-       fprintf(stderr, "[lockupinfo]dump window manager info\n");
-       snprintf(cbuf, sizeof(cbuf), "%s %s/%s",
-                       "/usr/bin/e_comp_util -l DUMP_INFO -f", dbuf, "e_comp.log");
-       system(cbuf);
-
-       snprintf(cbuf, sizeof(cbuf), "%s %s/%s",
-                       "/usr/bin/border_win_info -p ALL -f", dbuf, "e_illume2.log");
-       system(cbuf);
-
-       system("/usr/bin/keygrab_status 2");
-       snprintf(cbuf, sizeof(cbuf), "%s %s",
-                       "cp -af /opt/var/log/keygrab_status.txt", dbuf);
-       system(cbuf);
-
-       snprintf(cbuf, sizeof(cbuf), "%s %s/%s",
-                       "/usr/bin/screenshot bmp", dbuf, "slp_screenshot.bmp");
-       system(cbuf);
-
-       snprintf(cbuf, sizeof(cbuf), "%s> %s/%s",
-                       "xinfo -topvwins 2", dbuf, "xinfo_topvwins.txt");
-       system(cbuf);
-
-       /* end from window team */
-
-       /*  copy prev xorg log */
-       snprintf(cbuf, sizeof(cbuf), "%s %s",
-                       "cp /opt/var/log/prev.Xorg.*", dbuf);
-       system(cbuf);
-
-       /*  copy xorg log */
-       snprintf(cbuf, sizeof(cbuf), "%s %s",
-                       "cp /opt/var/log/Xorg.*", dbuf);
-       system(cbuf);
-
-       /* dump a list of current tasks and their information */
-       /* requsted by window team */
-       /*snprintf(cbuf, sizeof(cbuf), "echo t > /proc/sysrq-trigger");
-        *system(cbuf);
-        */
-
-       /* copy syslog messages */
-       snprintf(cbuf, sizeof(cbuf), "%s %s",
-                       "cp /opt/var/log/messages*", dbuf);
-       system(cbuf);
-
-       /* copy nand log */
-       snprintf(cbuf, sizeof(cbuf), "%s %s",
-                       "cp /opt/var/log/nandlog_*", dbuf);
-       system(cbuf);
-
-       fprintf(stderr, "[lockupinfo] exit\n");
-       return 0;
-
-}
-
-
diff --git a/lockupinfo/lockupinfo.sh b/lockupinfo/lockupinfo.sh
deleted file mode 100755 (executable)
index e5a91be..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-export DISPLAY=:0
-echo t > /proc/sysrq-trigger
-/usr/bin/lockupinfo
diff --git a/packaging/sys-assert.manifest b/packaging/sys-assert.manifest
new file mode 100644 (file)
index 0000000..f0187cb
--- /dev/null
@@ -0,0 +1,15 @@
+<manifest>
+       <define>
+               <domain name="sys-assert"/>
+               <provide>
+                       <label name="sys-assert::core"/>
+               </provide>
+       </define>
+       <request>
+               <domain name="sys-assert"/>
+       </request>
+       <assign>
+               <filesystem path="/usr/lib/libsys-assert.so" label="_" exec_label="none"/>
+               <filesystem path="/etc/ld.so.preload" label="_" exec_label="none"/>
+       </assign>
+</manifest>
index 5b6bbfc..95eb11d 100644 (file)
@@ -1,27 +1,39 @@
-#sbs-git:slp/pkgs/s/sys-assert sys-assert 0.3.0 8c6fe2f2b76743849583c95c96073692877ab541
 Name:       sys-assert
 Summary:    libsys-assert (shared object).
-Version:    0.3.1
-Release:    0
-Group:      TBD
-License:    LGPL
+Version:    0.3.2
+Release:    10
+Group:      Framework/system
+License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
+Source1:       %{name}.manifest
+Source101:     packaging/tizen-debug-on.service
+Source102:     packaging/tizen-debug-off.service
 
-BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  cmake
-BuildRequires:  edje-tools
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(libunwind)
+BuildRequires: cmake
+Requires:      libunwind
+Requires(post): coreutils
+Requires(post): smack-utils
 
 %description
 libsys-assert (shared object).
 
 %prep
 %setup -q
+cp %{SOURCE1} .
 
 %build
-export CFLAGS+=" -fPIC"
+%if 0%{?sec_build_binary_crash_enable}
+export CFLAGS+=" -DTIZEN_ENABLE_COREDUMP"
+%endif
+export CFLAGS+=" -fPIC -Werror"
 %ifarch %{arm}
-    export CFLAGS+=" -DTARGET"
+       export CFLAGS+=" -DARM"
+%else
+       %ifarch %{ix86}
+       export CFLAGS+=" -DX86"
+       %endif
 %endif
 
 cmake . -DCMAKE_INSTALL_PREFIX=/usr
@@ -30,29 +42,28 @@ make %{?jobs:-j%jobs}
 
 %install
 rm -rf %{buildroot}
-
 %make_install
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE %{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
+ln -s ../tizen-debug-on.service %{buildroot}%{_libdir}/systemd/system/sysinit.target.wants/tizen-debug-on.service
+ln -s ../tizen-debug-off.service %{buildroot}%{_libdir}/systemd/system/sysinit.target.wants/tizen-debug-off.service
 
 %post
 /sbin/ldconfig
-mkdir -p /opt/bs/core
-chown 0:5000 /opt/bs/core
-chmod 775 /opt/bs/core
-mkdir -p /opt/share/hidden_storage/SLP_debug
-chown 0:5000 /opt/share/hidden_storage
-chmod 775 /opt/share/hidden_storage
-chown 0:5000 /opt/share/hidden_storage/SLP_debug
-chmod 775 /opt/share/hidden_storage/SLP_debug
-chmod +x /etc/opt/init/sys-assert.init.sh
-/etc/opt/init/sys-assert.init.sh
+if [ ! -d /.build ]; then
+       echo "/usr/lib/libsys-assert.so" >> /etc/ld.so.preload
+       chmod 644 /etc/ld.so.preload
+fi
 
 %files
-/usr/bin/*
-/usr/lib/*.so*
-/etc/udev/rules.d/92-rb-dump.rules
-/etc/opt/init/sys-assert.init.sh
-/usr/opt/etc/.debugmode
-/usr/bin/lockupinfo
-/usr/bin/lockupinfo.sh
-/usr/lib/libsys-assert.so
-
+%manifest %{name}.manifest
+/opt/etc/.debugmode
+%{_libdir}/libsys-assert.so
+/usr/share/license/%{name}
+%{_libdir}/systemd/system/tizen-debug-on.service
+%{_libdir}/systemd/system/tizen-debug-off.service
+%{_libdir}/systemd/system/sysinit.target.wants/tizen-debug-on.service
+%{_libdir}/systemd/system/sysinit.target.wants/tizen-debug-off.service
diff --git a/packaging/tizen-debug-off.service b/packaging/tizen-debug-off.service
new file mode 100644 (file)
index 0000000..7c0db59
--- /dev/null
@@ -0,0 +1,16 @@
+[Unit]
+Description=tizen debug off
+DefaultDependencies=no
+After=opt.mount tizen-debug-on.service
+Before=sysinit.target
+ConditionKernelCommandLine=sec_debug.enable=0
+ConditionKernelCommandLine=sec_debug.enable_user=0
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/rm -f /opt/etc/.debugmode
+ExecStart=/sbin/sysctl kernel.core_pattern=/dev/null
+
+[Install]
+WantedBy=sysinit.target
diff --git a/packaging/tizen-debug-on.service b/packaging/tizen-debug-on.service
new file mode 100644 (file)
index 0000000..94dd3da
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=tizen debug on
+DefaultDependencies=no
+After=opt.mount
+Before=sysinit.target
+
+[Service]
+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
+
+[Install]
+WantedBy=sysinit.target
diff --git a/src/arm/backtrace.c b/src/arm/backtrace.c
new file mode 100644 (file)
index 0000000..7520bba
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * SYS-ASSERT
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <stdio.h>
+#include <ucontext.h>
+#include <libunwind.h>
+#include <execinfo.h>
+#include "util.h"
+
+int dump_callstack(void **callstack_addrs, int size, void *context, int retry)
+{
+       ucontext_t *ucontext = context;
+       int count;
+
+       if (!callstack_addrs)
+               return 0;
+
+       if (!retry && (context && ((int)ucontext->uc_mcontext.arm_pc != 0)))
+               count = unw_backtrace(callstack_addrs, size);
+       else
+               count = backtrace(callstack_addrs, size);
+
+       if (count > CALLSTACK_BASE) {
+               count -= CALLSTACK_BASE;
+       } else if (context) {
+               callstack_addrs[CALLSTACK_BASE] = (long *)ucontext->uc_mcontext.arm_pc;
+               callstack_addrs[CALLSTACK_BASE] = (long *)ucontext->uc_mcontext.arm_lr;
+               count = 2;
+       } else {
+               count = 0;
+       }
+       return count;
+};
diff --git a/src/arm/context.c b/src/arm/context.c
new file mode 100644 (file)
index 0000000..ec59f9e
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * SYS-ASSERT
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ucontext.h>
+#include "sys-assert.h"
+#include "util.h"
+
+#define CRASH_REGISTERINFO_TITLE "Register Information"
+
+void dump_registers(int fd, void *context)
+{
+       ucontext_t *ucontext = context;
+       /* for context info */
+       if (!context)
+               return;
+
+       fprintf_fd(fd, "\n%s\n", CRASH_REGISTERINFO_TITLE);
+       fprintf_fd(fd,
+               "r0   = 0x%08x, r1   = 0x%08x\nr2   = 0x%08x, r3   = 0x%08x\n",
+               ucontext->uc_mcontext.arm_r0,
+               ucontext->uc_mcontext.arm_r1,
+               ucontext->uc_mcontext.arm_r2,
+               ucontext->uc_mcontext.arm_r3);
+       fprintf_fd(fd,
+               "r4   = 0x%08x, r5   = 0x%08x\nr6   = 0x%08x, r7   = 0x%08x\n",
+               ucontext->uc_mcontext.arm_r4,
+               ucontext->uc_mcontext.arm_r5,
+               ucontext->uc_mcontext.arm_r6,
+               ucontext->uc_mcontext.arm_r7);
+       fprintf_fd(fd,
+               "r8   = 0x%08x, r9   = 0x%08x\nr10  = 0x%08x, fp   = 0x%08x\n",
+               ucontext->uc_mcontext.arm_r8,
+               ucontext->uc_mcontext.arm_r9,
+               ucontext->uc_mcontext.arm_r10,
+               ucontext->uc_mcontext.arm_fp);
+       fprintf_fd(fd,
+               "ip   = 0x%08x, sp   = 0x%08x\nlr   = 0x%08x, pc   = 0x%08x\n",
+               ucontext->uc_mcontext.arm_ip,
+               ucontext->uc_mcontext.arm_sp,
+               ucontext->uc_mcontext.arm_lr,
+               ucontext->uc_mcontext.arm_pc);
+       fprintf_fd(fd, "cpsr = 0x%08x\n",
+               ucontext->uc_mcontext.arm_cpsr);
+};
diff --git a/src/sys-assert.c b/src/sys-assert.c
new file mode 100644 (file)
index 0000000..41f033e
--- /dev/null
@@ -0,0 +1,863 @@
+/*
+ * SYS-ASSERT
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <errno.h>
+#include <execinfo.h>
+#include <dlfcn.h>
+#include <elf.h>
+#include <fcntl.h>
+#include <ucontext.h>
+#include <signal.h>
+#include <linux/unistd.h>
+#include <sys/mman.h>
+#include <sys/prctl.h>
+#include <sys/stat.h>
+#include <sys/sysinfo.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <time.h>
+#include <libunwind.h>
+#include "sys-assert.h"
+#include "util.h"
+
+#define CMDLINE_PATH "/proc/self/cmdline"
+#define EXE_PATH "/proc/self/exe"
+#define MAPS_PATH "/proc/self/maps"
+#define MEMINFO_PATH "/proc/meminfo"
+#define VERINFO_PATH "/etc/info.ini"
+#define STATUS_PATH "/proc/self/status"
+#define TASK_PATH "/proc/self/task"
+
+#define CRASH_INFO_PATH "/tmp"
+#define CRASH_SOCKET "/tmp/crash_socket"
+#define CRASH_SOCKET_PATH_LEN 17
+
+#define CRASH_CALLSTACKINFO_TITLE "Callstack Information"
+#define CRASH_CALLSTACKINFO_TITLE_E "End of Call Stack"
+#define CRASH_MAPSINFO_TITLE "Maps Information"
+#define CRASH_MAPSINFO_TITLE_E "End of Maps Information"
+#define CRASH_MEMINFO_TITLE "Memory Information"
+#define CRASH_THREADINFO_TITLE "Threads Information"
+
+#define STR_ANONY "[anony]"
+#define STR_ANNOY_LEN 8
+
+#define HEXA 16
+#define PERM_LEN 5
+#define ADDR_LEN 8
+#define INFO_LEN 20
+#define VALUE_LEN 24
+#define TIME_MAX_LEN 64
+#define FILE_LEN 255
+#define BUF_SIZE (BUFSIZ)
+#define CALLSTACK_SIZE 100
+#define FUNC_NAME_MAX_LEN 128
+#define PATH_LEN (FILE_LEN + NAME_MAX)
+
+#define KB(bytes)       ((bytes)/1024)
+
+/* permission for open file */
+#define DIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
+/* permission for open file */
+#define FILE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
+
+int sig_to_handle[] = {
+       SIGILL, SIGTRAP, SIGABRT, SIGBUS,
+       SIGFPE, SIGSEGV, SIGSTKFLT, SIGXCPU, SIGXFSZ, SIGSYS };
+
+#define NUM_SIG_TO_HANDLE      \
+       ((int)(sizeof(sig_to_handle)/sizeof(sig_to_handle[0])))
+
+struct sigaction g_oldact[NUM_SIG_TO_HANDLE];
+
+extern void dump_registers(int fd, void *context);
+extern int dump_callstack(void **callstack_addrs, int size, void *context, int retry);
+
+/* get function symbol from elf */
+static int trace_symbols(void *const *array, int size, struct addr_node *start, int fd)
+{
+       Dl_info info_funcs;
+       Elf32_Ehdr elf_h;
+       Elf32_Shdr *s_headers;
+       Elf32_Sym *symtab_entry;
+       int i, cnt, file, ret;
+       char *fname;
+       unsigned int addr, start_addr, offset_addr;
+       unsigned int strtab_index = 0;
+       unsigned int symtab_index = 0;
+       int num_st = 0;
+       int found_symtab = 0;
+
+       for (cnt = 0; cnt < size; cnt++) {
+               num_st = 0;
+               /* FIXME : for walking on stack trace */
+               if (dladdr(array[cnt], &info_funcs) == 0) {
+                       fprintf(stderr, "[sys-assert]dladdr returnes error!\n");
+                       /* print just address */
+                       fprintf_fd(fd,
+                                       "%2d: (%p) %s\n",
+                                       cnt, array[cnt], dlerror());
+                       continue;
+               }
+               start_addr = (unsigned int)get_start_addr(array[cnt], start);
+               addr = (unsigned int)array[cnt];
+               /* 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)) {
+                       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)
+                               continue;
+                       file = open(info_funcs.dli_fname, O_RDONLY);
+                       if (file < 0) {
+                               fname = strchr(info_funcs.dli_fname, '/');
+                               if (!fname)
+                                       continue;
+                               file = open(fname, O_RDONLY);
+                               if (file < 0) {
+                                       fprintf_fd(fd,
+                                                       "%2d: (%p) [%s] + %p\n",
+                                                       cnt, array[cnt],
+                                                       info_funcs.dli_fname, offset_addr);
+                                       continue;
+                               }
+                       }
+                       ret = read(file, &elf_h, sizeof(Elf32_Ehdr));
+                       if (ret < sizeof(Elf32_Ehdr) ||
+                                       elf_h.e_shnum <= 0 ||
+                                       SHN_LORESERVE < elf_h.e_shnum) {
+                               fprintf_fd(fd, "%2d: (%p) [%s] + %p\n",
+                                               cnt, array[cnt], info_funcs.dli_fname, offset_addr);
+                               close(file);
+                               continue;
+                       }
+                       if (elf_h.e_type == ET_EXEC) {
+                               info_funcs.dli_fbase = 0;
+                               offset_addr = addr;
+                       }
+                       s_headers =
+                               (Elf32_Shdr *) mmap(0, elf_h.e_shnum * sizeof(Elf32_Shdr),
+                                               PROT_READ | PROT_WRITE,
+                                               MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+                       if (s_headers == NULL) {
+                               fprintf(stderr, "[sys-assert]malloc failed\n");
+                               fprintf_fd(fd, "%2d: (%p) [%s] + %p\n",
+                                               cnt, array[cnt], info_funcs.dli_fname, offset_addr);
+                               close(file);
+                               continue;
+                       }
+                       ret = lseek(file, elf_h.e_shoff, SEEK_SET);
+                       if (ret < 0 || elf_h.e_shentsize > sizeof(Elf32_Shdr) ||
+                                       elf_h.e_shentsize <= 0) {
+                               close(file);
+                               munmap(s_headers, elf_h.e_shnum * sizeof(Elf32_Shdr));
+                               return -1;
+                       }
+                       for (i = 0; i < elf_h.e_shnum; i++) {
+                               ret = read(file, &s_headers[i], elf_h.e_shentsize);
+                               if (ret < elf_h.e_shentsize) {
+                                       fprintf(stderr, "[sys-assert]read error\n");
+                                       munmap(s_headers, elf_h.e_shnum * sizeof(Elf32_Shdr));
+                                       close(file);
+                                       return -1;
+                               }
+                       }
+                       for (i = 0; i < elf_h.e_shnum; i++) {
+                               if (s_headers[i].sh_type == SHT_SYMTAB) {
+                                       symtab_index = i;
+                                       if (s_headers[i].sh_entsize != 0 &&
+                                                       s_headers[i].sh_size != 0) {
+                                               num_st =
+                                                       s_headers[i].sh_size / s_headers[i].sh_entsize;
+                                               found_symtab = 1;
+                                       }
+                                       break;
+                               }
+                       }
+                       if (!found_symtab) {
+                               fprintf(stderr,
+                                               "[sys-assert] can't find symtab\n");
+                               munmap(s_headers, elf_h.e_shnum * sizeof(Elf32_Shdr));
+                               close(file);
+                       } else {
+                               /*.strtab index */
+                               if (symtab_index < elf_h.e_shnum)
+                                       strtab_index = s_headers[symtab_index].sh_link;
+                               if (!strtab_index ||  elf_h.e_shnum <= strtab_index) {
+                                       fprintf_fd(fd, "%2d: (%p) [%s] + %p\n",
+                                               cnt, array[cnt], info_funcs.dli_fname, offset_addr);
+                                       munmap(s_headers, elf_h.e_shnum * sizeof(Elf32_Shdr));
+                                       close(file);
+                                       continue;
+                               }
+                               symtab_entry =
+                                       (Elf32_Sym *)mmap(0, sizeof(Elf32_Sym) * num_st,
+                                               PROT_READ | PROT_WRITE,
+                                               MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+                               if (symtab_entry == NULL) {
+                                       fprintf(stderr, "[sys-assert]malloc failed\n");
+                                       munmap(s_headers, elf_h.e_shnum * sizeof(Elf32_Shdr));
+                                       close(file);
+                                       return -1;
+                               }
+                               ret = lseek(file, s_headers[symtab_index].sh_offset, SEEK_SET);
+                               if (ret < 0) {
+                                       fprintf_fd(fd, "%2d: (%p) [%s] + %p\n",
+                                               cnt, array[cnt], info_funcs.dli_fname, offset_addr);
+                                       munmap(symtab_entry, sizeof(Elf32_Sym) * num_st);
+                                       munmap(s_headers, elf_h.e_shnum * sizeof(Elf32_Shdr));
+                                       close(file);
+                                       continue;
+                               }
+                               for (i = 0; i < num_st; i++) {
+                                       ret = read(file, &symtab_entry[i], sizeof(Elf32_Sym));
+                                       if (ret < sizeof(Elf32_Sym)) {
+                                               fprintf_fd(fd,
+                                                       "[sys-assert]symtab_entry[%d], num_st=%d, readnum = %d\n",
+                                                               i, num_st, ret);
+                                               break;
+                                       }
+                                       if (((info_funcs.dli_fbase +
+                                                                       symtab_entry[i].st_value)
+                                                               <= array[cnt])
+                                                       && (array[cnt] <=
+                                                               (info_funcs.dli_fbase +
+                                                                symtab_entry[i].st_value +
+                                                                symtab_entry[i].st_size))) {
+                                               if (symtab_entry[i].st_shndx != STN_UNDEF) {
+                                                       ret = lseek(file,
+                                                                       s_headers[strtab_index].sh_offset +
+                                                                       symtab_entry[i].st_name,
+                                                                       SEEK_SET);
+                                                       if (ret < 0)
+                                                               break;
+                                                       info_funcs.dli_sname =
+                                                               (void *)mmap(0, FUNC_NAME_MAX_LEN,
+                                                                       PROT_READ | PROT_WRITE,
+                                                                       MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+                                                       ret = read(file, (void *)info_funcs.dli_sname,
+                                                                       FUNC_NAME_MAX_LEN);
+                                                       if (ret < 0)
+                                                               break;
+                                                       info_funcs.dli_saddr =
+                                                               info_funcs.dli_fbase +
+                                                               symtab_entry[i].st_value;
+                                               }
+                                               break;
+                                       }
+                               }
+                               munmap(s_headers, elf_h.e_shnum * sizeof(Elf32_Shdr));
+                               munmap(symtab_entry, sizeof(Elf32_Sym) * num_st);
+                               close(file);
+                       }
+               }
+               /* print symbol name and address. */
+               if (info_funcs.dli_sname != NULL) {
+                       if (array[cnt] >= info_funcs.dli_saddr)
+                               fprintf_fd(fd, "%2d: %s + 0x%x (%p) [%s] + %p\n",
+                                               cnt, info_funcs.dli_sname,
+                                               (array[cnt] - info_funcs.dli_saddr),
+                                               array[cnt], info_funcs.dli_fname, offset_addr);
+                       else
+                               fprintf_fd(fd, "%2d: %s - 0x%x (%p) [%s] + %p\n",
+                                               cnt, info_funcs.dli_sname,
+                                               (info_funcs.dli_saddr - array[cnt]),
+                                               array[cnt], info_funcs.dli_fname, offset_addr);
+               } else {
+                       fprintf_fd(fd, "%2d: (%p) [%s] + %p\n",
+                                       cnt, array[cnt], info_funcs.dli_fname, offset_addr);
+               }
+       }
+       return 0;
+}
+/* get address list from maps */
+static struct addr_node *get_addr_list_from_maps(int fd)
+{
+       int fpath_len, result;
+       long *saddr;
+       long *eaddr;
+       char perm[PERM_LEN];
+       char path[PATH_LEN];
+       char addr[ADDR_LEN * 2];
+       char linebuf[BUF_SIZE];
+       struct addr_node *head = NULL;
+       struct addr_node *tail = NULL;
+       struct addr_node *t_node = NULL;
+
+       /* parsing the maps to get executable code address */
+       while (fgets_fd(linebuf, BUF_SIZE, fd) != NULL) {
+               memset(path, 0, PATH_LEN);
+               result = sscanf(linebuf, "%s %s %*s %*s %*s %s ", addr, perm, path);
+               if (result < 0)
+                       continue;
+               perm[PERM_LEN - 1] = 0;
+               /* rwxp */
+#ifdef ARM
+               if ((perm[2] == 'x' && path[0] == '/') ||
+                               (perm[1] == 'w' && path[0] != '/')) {
+#else
+               if (strncmp(perm, "r-xp", strlen("r-xp")) == 0) {
+#endif
+                       /* add addr node to list */
+                       addr[ADDR_LEN] = 0;
+                       saddr = (long *)strtoul(addr, NULL, HEXA);
+                       /* ffff0000-ffff1000 */
+                       eaddr = (long *)strtoul(&addr[ADDR_LEN + 1], NULL, HEXA);
+                       /* make node and attach to the list */
+                       t_node = (struct addr_node *)mmap(0, sizeof(struct addr_node),
+                                       PROT_READ | PROT_WRITE,
+                                       MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+                       if (t_node == NULL) {
+                               fprintf(stderr, "error : mmap\n");
+                               return NULL;
+                       }
+                       memcpy(t_node->perm, perm, PERM_LEN);
+                       t_node->startaddr = saddr;
+                       t_node->endaddr = eaddr;
+                       t_node->fpath = NULL;
+                       fpath_len = strlen(path);
+                       if (fpath_len > 0) {
+                               t_node->fpath = (char *)mmap(0, fpath_len + 1,
+                                               PROT_READ | PROT_WRITE,
+                                               MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+                               memset(t_node->fpath, 0, fpath_len + 1);
+                               memcpy(t_node->fpath, path, fpath_len);
+                       } else {
+                               t_node->fpath = (char *)mmap(0, STR_ANNOY_LEN,
+                                               PROT_READ | PROT_WRITE,
+                                               MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+                               memset(t_node->fpath, 0, STR_ANNOY_LEN);
+                               memcpy(t_node->fpath, STR_ANONY, STR_ANNOY_LEN);
+                       }
+                       t_node->next = NULL;
+                       if (head == NULL) {
+                               head = t_node;
+                               tail = t_node;
+                       } else {
+                               tail->next = t_node;
+                               tail = t_node;
+                       }
+               }
+       }
+       return head;
+}
+
+static void print_node_to_file(struct addr_node *start, int fd)
+{
+       struct addr_node *t_node;
+
+       t_node = start;
+       fprintf_fd(fd, "\n%s\n", CRASH_MAPSINFO_TITLE);
+       while (t_node) {
+               if (!strncmp(STR_ANONY, t_node->fpath, STR_ANNOY_LEN)) {
+                       t_node = t_node->next;
+               } else {
+                       fprintf_fd(fd,
+                                       "%08x %08x %s %s\n",
+                                       (unsigned int)t_node->startaddr,
+                                       (unsigned int)t_node->endaddr,
+                                       t_node->perm, t_node->fpath);
+                       t_node = t_node->next;
+               }
+       }
+       fprintf_fd(fd, "%s\n", CRASH_MAPSINFO_TITLE_E);
+}
+
+static void free_all_nodes(struct addr_node *start)
+{
+       struct addr_node *t_node, *n_node;
+       int fpath_len;
+
+       if (start == NULL)
+               return;
+       t_node = start;
+       n_node = t_node->next;
+       while (t_node) {
+               if (t_node->fpath != NULL) {
+                       fpath_len = strlen(t_node->fpath);
+                       munmap(t_node->fpath, fpath_len + 1);
+               }
+               munmap(t_node, sizeof(struct addr_node));
+               if (n_node == NULL)
+                       break;
+               t_node = n_node;
+               n_node = n_node->next;
+       }
+}
+
+static void print_signal_info(int signum, const siginfo_t *info, int fd)
+{
+       fprintf_fd(fd, "Signal: %d\n", signum);
+       switch (signum) {
+       case SIGILL:
+               fprintf_fd(fd, "      (SIGILL)\n");
+               break;
+       case SIGTRAP:
+               fprintf_fd(fd, "      (SIGTRAP)\n");
+               break;
+       case SIGABRT:
+               fprintf_fd(fd, "      (SIGABRT)\n");
+               break;
+       case SIGBUS:
+               fprintf_fd(fd, "      (SIGBUS)\n");
+               break;
+       case SIGFPE:
+               fprintf_fd(fd, "      (SIGFPE)\n");
+               break;
+       case SIGSEGV:
+               fprintf_fd(fd, "      (SIGSEGV)\n");
+               break;
+       case SIGTERM:
+               fprintf_fd(fd, "      (SIGTERM)\n");
+               break;
+       case SIGSTKFLT:
+               fprintf_fd(fd, "      (SIGSTKFLT)\n");
+               break;
+       case SIGXCPU:
+               fprintf_fd(fd, "      (SIGXCPU)\n");
+               break;
+       case SIGXFSZ:
+               fprintf_fd(fd, "      (SIGXFSZ)\n");
+               break;
+       case SIGSYS:
+               fprintf_fd(fd, "      (SIGSYS)\n");
+               break;
+       default:
+               fprintf_fd(fd, "\n");
+       }
+       /* print signal si_code info */
+       fprintf_fd(fd, "      si_code: %d\n", info->si_code);
+       if (info->si_code <= 0 || info->si_code >= 0x80) {
+               switch (info->si_code) {
+#ifdef SI_TKILL
+               case SI_TKILL:
+                       fprintf_fd(fd,
+                                       "      signal sent by tkill (sent by pid %d, uid %d)\n",
+                               info->si_pid, info->si_uid);
+                       break;
+#endif
+#ifdef SI_USER
+               case SI_USER:
+                       fprintf_fd(fd,
+                               "      signal sent by kill (sent by pid %d, uid %d)\n",
+                               info->si_pid, info->si_uid);
+                       break;
+#endif
+#ifdef SI_KERNEL
+               case SI_KERNEL:
+                       fprintf_fd(fd, "      signal sent by the kernel\n");
+                       break;
+#endif
+               }
+       } else if (signum == SIGILL) {
+               switch (info->si_code) {
+               case ILL_ILLOPC:
+                       fprintf_fd(fd, "      illegal opcode\n");
+                       break;
+               case ILL_ILLOPN:
+                       fprintf_fd(fd, "      illegal operand\n");
+                       break;
+               case ILL_ILLADR:
+                       fprintf_fd(fd, "      illegal addressing mode\n");
+                       break;
+               case ILL_ILLTRP:
+                       fprintf_fd(fd, "      illegal trap\n");
+                       break;
+               case ILL_PRVOPC:
+                       fprintf_fd(fd, "      privileged opcode\n");
+                       break;
+               case ILL_PRVREG:
+                       fprintf_fd(fd, "      privileged register\n");
+                       break;
+               case ILL_COPROC:
+                       fprintf_fd(fd, "      coprocessor error\n");
+                       break;
+               case ILL_BADSTK:
+                       fprintf_fd(fd, "      internal stack error\n");
+                       break;
+               default:
+                       fprintf_fd(fd, "      illegal si_code = %d\n", info->si_code);
+                       break;
+               }
+               fprintf_fd(fd, "      si_addr: %p\n", info->si_addr);
+       } else if (signum == SIGFPE) {
+               switch (info->si_code) {
+               case FPE_INTDIV:
+                       fprintf_fd(fd, "      integer divide by zero\n");
+                       break;
+               case FPE_INTOVF:
+                       fprintf_fd(fd, "      integer overflow\n");
+                       break;
+               case FPE_FLTDIV:
+                       fprintf_fd(fd, "      floating-point divide by zero\n");
+                       break;
+               case FPE_FLTOVF:
+                       fprintf_fd(fd, "      floating-point overflow\n");
+                       break;
+               case FPE_FLTUND:
+                       fprintf_fd(fd, "      floating-point underflow\n");
+                       break;
+               case FPE_FLTRES:
+                       fprintf_fd(fd, "      floating-point inexact result\n");
+                       break;
+               case FPE_FLTINV:
+                       fprintf_fd(fd, "      invalid floating-point operation\n");
+                       break;
+               case FPE_FLTSUB:
+                       fprintf_fd(fd, "      subscript out of range\n");
+                       break;
+               default:
+                       fprintf_fd(fd, "      illegal si_code: %d\n", info->si_code);
+                       break;
+               }
+       } else if (signum == SIGSEGV) {
+               switch (info->si_code) {
+                       case SEGV_MAPERR:
+                               fprintf_fd(fd, "      address not mapped to object\n");
+                               break;
+                       case SEGV_ACCERR:
+                               fprintf_fd(fd,
+                                               "      invalid permissions for mapped object\n");
+                               break;
+                       default:
+                               fprintf_fd(fd, "      illegal si_code: %d\n", info->si_code);
+                               break;
+               }
+               fprintf_fd(fd, "      si_addr = %p\n", info->si_addr);
+       } else if (signum == SIGBUS) {
+               switch (info->si_code) {
+                       case BUS_ADRALN:
+                               fprintf_fd(fd, "      invalid address alignment\n");
+                               break;
+                       case BUS_ADRERR:
+                               fprintf_fd(fd, "      nonexistent physical address\n");
+                               break;
+                       case BUS_OBJERR:
+                               fprintf_fd(fd, "      object-specific hardware error\n");
+                               break;
+                       default:
+                               fprintf_fd(fd, "      illegal si_code: %d\n", info->si_code);
+                               break;
+               }
+               fprintf_fd(fd, "      si_addr: %p\n", info->si_addr);
+       }
+}
+
+void sighandler(int signum, siginfo_t *info, void *context)
+{
+       int idx;
+       int readnum;
+       int threadnum;
+       /* file descriptor */
+       int fd;
+       int fd_cs;              /* for cs file */
+       pid_t pid;
+       pid_t tid;
+       DIR *dir;
+       struct dirent *dentry;
+       char timestr[TIME_MAX_LEN];
+       char processname[NAME_MAX] = {0,};
+       char exepath[PATH_LEN] = {0,};
+       char filepath[PATH_LEN];
+       char crashid[TIME_MAX_LEN] = {0,};
+       /* for get time  */
+       time_t cur_time;
+       /* for get info */
+       char infoname[INFO_LEN];
+       char value[VALUE_LEN];
+       char linebuf[BUF_SIZE];
+       char *p_exepath = NULL;
+       void *callstack_addrs[CALLSTACK_SIZE];
+       int cnt_callstack = 0;
+       /* for backtrace_symbols() */
+       struct addr_node *head = NULL;
+       /* for preventing recursion */
+       static int retry_count = 0;
+       struct sysinfo si;
+       /* for notification */
+       int sent, sockfd = -1;
+       struct timeval tv_timeo = { 3, 500000 };
+       struct sockaddr_un clientaddr;
+
+       if (retry_count > 1) {
+               fprintf(stderr, "[sys-assert] recurcive called\n");
+               return;
+       }
+
+       cur_time = time(NULL);
+       /* get pid */
+       pid = getpid();
+       tid = (long int)syscall(__NR_gettid);
+       /* open maps file */
+       if ((fd = open(MAPS_PATH, O_RDONLY)) < 0) {
+               fprintf(stderr, "[sys-assert]can't open %s\n", MAPS_PATH);
+       } else {
+               /* parsing the maps to get code segment address*/
+               head = get_addr_list_from_maps(fd);
+               close(fd);
+       }
+       if (retry_count)
+               fprintf(stderr, "retry backtrace in sighandler");
+       cnt_callstack = dump_callstack(callstack_addrs, CALLSTACK_SIZE, context, retry_count);
+       retry_count += 1;
+       /* get exepath */
+       if ((readnum = open_read(CMDLINE_PATH, exepath, sizeof(exepath) - 1)) <= 0) {
+               fprintf(stderr, "[sys-assert]can't read %s\n", CMDLINE_PATH);
+               readnum = snprintf(exepath, sizeof(exepath), "unknown_process");
+       }
+       exepath[readnum] = '\0';
+       /* get processname */
+       if ((p_exepath = remove_path(exepath)) == NULL)
+               return;
+       snprintf(processname, NAME_MAX, "%s", p_exepath);
+       /* added temporary skip  when crash-worker is asserted */
+       if (!strcmp(processname, "crash-worker") ||
+                       !strcmp(processname, "crash-popup"))
+               return;
+       /* make crash info file name */
+       snprintf(timestr, sizeof(timestr), "%.10ld", cur_time);
+       snprintf(crashid, sizeof(crashid), "%.2d%.5d%02x%02x%02x%s",
+                               signum, pid, processname[0], processname[1], processname[2], timestr);
+       if (snprintf(filepath, PATH_LEN,
+                               "%s/%s.info", CRASH_INFO_PATH, crashid) == 0) {
+               fprintf(stderr,
+                               "[sys-assert]can't make crash info file name : %s\n",
+                               crashid);
+               return;
+       }
+       /* 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;
+               }
+       }
+       /* logging crash information to stderr */
+       fprintf(stderr, "crashed [%s] processname=%s, pid=%d, tid=%d, signal=%d",
+                       timestr, processname, pid, tid, signum);
+       /* complete filepath_cs */
+       if (!strlen(filepath))
+               return;
+       /* create cs file */
+       if ((fd_cs = creat(filepath, FILE_PERMS)) < 0) {
+               fprintf(stderr,
+                               "[sys-assert]can't create %s. errno = %s\n",
+                               filepath, strerror(errno));
+               return;
+       }
+
+       /* print exepath info */
+       fprintf_fd(fd_cs, "Executable File Path: %s\n", exepath);
+
+       /* print signal info */
+       print_signal_info(signum, info, fd_cs);
+       fsync(fd_cs);
+       /* print register info */
+       dump_registers(fd_cs, context);
+
+       /* print meminfo */
+       fprintf_fd(fd_cs, "\n%s\n", CRASH_MEMINFO_TITLE);
+        if (!sysinfo(&si)) {
+                fprintf_fd(fd_cs, "MemTotal: %8ld KB\n", KB(si.totalram));
+                fprintf_fd(fd_cs, "MemFree:  %8ld KB\n", KB(si.freeram));
+                fprintf_fd(fd_cs, "Buffers:  %8ld KB\n", KB(si.bufferram));
+       } else
+               fprintf(stderr, "[sys-assert]can't get sysinfo\n");
+
+       if ((fd = open(MEMINFO_PATH, O_RDONLY)) < 0) {
+               fprintf(stderr, "[sys-assert]can't open %s\n", MEMINFO_PATH);
+       } else {
+               while (fgets_fd(linebuf, BUF_SIZE, fd) != NULL) {
+                       sscanf(linebuf, "%s %s %*s", infoname, value);
+                       if (strcmp("Cached:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s   %8s KB\n", infoname, value);
+                               break;
+                       }
+               }
+               close(fd);
+       }
+
+       threadnum = 0;
+       if ((fd = open(STATUS_PATH, O_RDONLY)) < 0) {
+               fprintf(stderr, "[sys-assert]can't open %s\n", STATUS_PATH);
+       } else {
+               while (fgets_fd(linebuf, BUF_SIZE, fd) != NULL) {
+                       sscanf(linebuf, "%s %s %*s", infoname, value);
+                       if (strcmp("VmPeak:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s   %8s KB\n", infoname,
+                                               value);
+                       } else if (strcmp("VmSize:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s   %8s KB\n", infoname,
+                                               value);
+                       } else if (strcmp("VmLck:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s    %8s KB\n", infoname,
+                                               value);
+                       } else if (strcmp("VmPin:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s    %8s KB\n", infoname,
+                                               value);
+                       } else if (strcmp("VmHWM:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s    %8s KB\n",
+                                               infoname, value);
+                       } else if (strcmp("VmRSS:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s    %8s KB\n",
+                                               infoname, value);
+                       } else if (strcmp("VmData:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s   %8s KB\n",
+                                               infoname, value);
+                       } else if (strcmp("VmStk:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s    %8s KB\n",
+                                               infoname, value);
+                       } else if (strcmp("VmExe:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s    %8s KB\n",
+                                               infoname, value);
+                       } else if (strcmp("VmLib:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s    %8s KB\n",
+                                               infoname, value);
+                       } else if (strcmp("VmPTE:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s    %8s KB\n",
+                                               infoname, value);
+                       } else if (strcmp("VmSwap:", infoname) == 0) {
+                               fprintf_fd(fd_cs, "%s   %8s KB\n",
+                                               infoname, value);
+                       } else if (strcmp("Threads:", infoname) == 0) {
+                               threadnum = atoi(value);
+                               break;
+                       }
+               }
+               close(fd);
+       }
+       /* print thread info */
+       if (1 < threadnum) {
+               fprintf_fd(fd_cs, "\n%s\n", CRASH_THREADINFO_TITLE);
+               fprintf_fd(fd_cs,
+                               "Threads: %d\nPID = %d TID = %d\n",
+                               threadnum, pid, tid);
+               /* print thread */
+               dir = opendir(TASK_PATH);
+               if (!dir) {
+                       fprintf(stderr, "[sys-assert]can't open %s\n", TASK_PATH);
+               } else {
+                       while ((dentry = readdir(dir)) != NULL) {
+                               if( strcmp(dentry->d_name, ".") == 0
+                                               || strcmp(dentry->d_name, "..") == 0)
+                                       continue;
+                               fprintf_fd(fd_cs, "%s ",dentry->d_name);
+                       }
+                       closedir(dir);
+                       fprintf_fd(fd_cs, "\n");
+               }
+       }
+       if (head != NULL) {
+               /* print maps information */
+               print_node_to_file(head, fd_cs);
+               /* print callstack */
+               fprintf_fd(fd_cs, "\n%s (PID:%d)\n", CRASH_CALLSTACKINFO_TITLE, pid);
+               fprintf_fd(fd_cs, "Call Stack Count: %d\n", cnt_callstack);
+               if (trace_symbols(&callstack_addrs[CALLSTACK_BASE],
+                                       cnt_callstack, head, fd_cs) < 0)
+                       fprintf(stderr, "[sys-assert] trace_symbols failed\n");
+               fprintf_fd(fd_cs, "%s\n", CRASH_CALLSTACKINFO_TITLE_E);
+               free_all_nodes(head);
+       }
+       /* cs file sync */
+       fsync(fd_cs);
+       /* clean up */
+       if (close(fd_cs) == -1)
+               fprintf(stderr, "[sys-assert] fd_cs close error!!\n");
+       /* core dump set */
+#ifdef TIZEN_ENABLE_COREDUMP
+       if (prctl(PR_GET_DUMPABLE) == 0)
+               prctl(PR_SET_DUMPABLE, 1);
+#else
+       prctl(PR_SET_DUMPABLE, 0);
+#endif
+       /* NOTIFY CRASH */
+       if ((sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
+               fprintf(stderr, "[sys-assert] failed socket()");
+               goto exit;
+       }
+       if (setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO,
+                               &tv_timeo, sizeof(tv_timeo) ) < 0) {
+               fprintf(stderr, "[sys-assert] setsockopt SO_SNDTIMEO");
+               close(sockfd);
+               goto exit;
+       }
+       bzero(&clientaddr, sizeof(clientaddr));
+       clientaddr.sun_family = AF_UNIX;
+       memset(clientaddr.sun_path, 0x00, sizeof(clientaddr.sun_path));
+       strncpy(clientaddr.sun_path, CRASH_SOCKET, CRASH_SOCKET_PATH_LEN);
+       clientaddr.sun_path[CRASH_SOCKET_PATH_LEN] = '\0';
+
+       if (connect(sockfd, (struct sockaddr *)&clientaddr, sizeof(clientaddr)) < 0) {
+               close(sockfd);
+               fprintf(stderr, "[sys-assert] failed connect()");
+               goto exit;
+       }
+       snprintf(linebuf, sizeof(linebuf),
+                       "%d|%d|%s|%s|%s|%s", signum, pid, timestr,
+                       processname, exepath, crashid);
+
+       sent = write(sockfd, linebuf, strlen(linebuf));
+       if (sent < 0)
+               fprintf(stderr, "[sys-assert] failed write()");
+       close(sockfd);
+exit:
+       for (idx = 0; idx < NUM_SIG_TO_HANDLE; idx++) {
+               if (sig_to_handle[idx] == signum) {
+                       sigaction(signum, &g_oldact[idx], NULL);
+                       break;
+               }
+       }
+       raise(signum);
+}
+
+__attribute__ ((constructor))
+void init()
+{
+       int idx;
+
+       for (idx = 0; idx < NUM_SIG_TO_HANDLE; idx++) {
+               struct sigaction act;
+               act.sa_sigaction = (void *)sighandler;
+               sigemptyset(&act.sa_mask);
+               act.sa_flags = SA_SIGINFO;
+               act.sa_flags |= SA_RESETHAND;
+               if (sigaction(sig_to_handle[idx], &act, &g_oldact[idx]) < 0) {
+                       perror("[sys-assert]could not set signal handler ");
+                       continue;
+               }
+       }
+}
diff --git a/src/sys-assert.h b/src/sys-assert.h
new file mode 100755 (executable)
index 0000000..7412f3c
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * SYS-ASSERT
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _DEBUG_ASSERT_H_
+#define _DEBUG_ASSERT_H_
+
+#include <time.h>
+
+#ifdef ARM
+#define BASE_LAUNCHPAD_ADDR 0x8000
+#else
+#define BASE_LAUNCHPAD_ADDR 0x8048000
+#endif
+#define CALLSTACK_BASE 3
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+       struct addr_node {
+               long *startaddr;
+               long *endaddr;
+               char perm[5];
+               char *fpath;
+               struct addr_node *next;
+       };
+
+#ifdef ARM
+       typedef struct layout {
+               struct layout *fp;
+               void *ret;
+       } layout;
+
+#else
+       typedef struct layout {
+               struct layout *ebp;
+               void *ret;
+       } layout;
+#endif
+
+       extern void *__libc_stack_end;
+
+#ifdef __cplusplus
+}
+#endif
+#endif                         /* _DEBUG_ASSERT_H_ */
diff --git a/src/util.c b/src/util.c
new file mode 100644 (file)
index 0000000..30200ba
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * SYS-ASSERT
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include "util.h"
+
+int open_read(const char *path, char *buf, int size)
+{
+       int fd;
+       int ret;
+
+       if (buf == NULL || path == NULL)
+           return -1;
+
+       fd = open(path, O_RDONLY);
+       if (fd < 0)
+           return -1;
+
+       ret = read(fd, buf, size - 1);
+       if (ret <= 0) {
+           close(fd);
+           return -1;
+       } else
+           buf[ret] = '\0';
+
+       close(fd);
+
+       return ret;
+}
+
+char *fgets_fd(char *str, int len, int fd)
+{
+       char ch;
+       register char *cs;
+       int num = 0;
+
+       cs = str;
+       while (--len > 0 && (num = read(fd, &ch, 1) > 0)) {
+               if ((*cs++ = ch) == '\n')
+                       break;
+       }
+       *cs = '\0';
+       return (num == 0 && cs == str) ? NULL : str;
+}
+
+/* WARNING : formatted string buffer is limited to 1024 byte */
+int fprintf_fd(int fd, const char *fmt, ...)
+{
+       int n, ret;
+       char buff[1024];
+       va_list args;
+
+       va_start(args, fmt);
+       n = vsnprintf(buff, 1024 - 1, fmt, args);
+       ret = write(fd, buff, n);
+       if (ret < 0)
+               fprintf(stderr, "write failed\n");
+       va_end(args);
+       return n;
+}
+
+char *remove_path(const char *cmd)
+{
+       char *cp;
+       char *np;
+
+       cp = np = (char *)cmd;
+       while (*cp && *cp != ' ') {
+               if (*cp == '/')
+                       np = cp + 1;
+               cp++;
+       }
+       return np;
+}
+
+char *get_fpath(long *value, struct addr_node *start)
+{
+       struct addr_node *t_node;
+       struct addr_node *n_node;
+
+       if (value == 0 || start == NULL)
+               return NULL;
+       t_node = start;
+       n_node = t_node->next;
+       while (n_node) {
+               if (t_node->endaddr <= value) {
+                       t_node = n_node;
+                       n_node = n_node->next;
+               } else if (t_node->startaddr <= value) {
+                       return t_node->fpath;
+               } else
+                       break;
+       }
+       return NULL;
+}
+
+long *get_start_addr(long *value, struct addr_node *start)
+{
+       struct addr_node *t_node;
+       struct addr_node *n_node;
+
+       if (value == 0 || start == NULL)
+               return NULL;
+       t_node = start;
+       n_node = t_node->next;
+       while (n_node) {
+               if (t_node->endaddr <= value) {
+                       t_node = n_node;
+                       n_node = n_node->next;
+               } else if (t_node->startaddr <= value) {
+                       return t_node->startaddr;
+               } else
+                       break;
+       }
+       return NULL;
+}
diff --git a/src/util.h b/src/util.h
new file mode 100644 (file)
index 0000000..a06077e
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * SYS-ASSERT
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "sys-assert.h"
+
+int open_read(const char *path, char *buf, int size);
+
+char *fgets_fd(char *str, int len, int fd);
+
+/* WARNING : formatted string buffer is limited to 1024 byte */
+int fprintf_fd(int fd, const char *fmt, ...);
+
+char *remove_path(const char *cmd);
+
+char *get_fpath(long *value, struct addr_node *start);
+
+long *get_start_addr(long *value, struct addr_node *start);
diff --git a/src/x86/backtrace.c b/src/x86/backtrace.c
new file mode 100644 (file)
index 0000000..c2ab833
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * SYS-ASSERT
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <stdio.h>
+#include <execinfo.h>
+#include <ucontext.h>
+#include "sys-assert.h"
+#include "util.h"
+
+int dump_callstack(void **callstack_addrs, int size, void *context, int retry)
+{
+       ucontext_t *ucontext = context;
+       int count = CALLSTACK_BASE;
+
+       if (!callstack_addrs)
+               return 0;
+
+       if (context) {
+               layout *ebp = (layout *)ucontext->uc_mcontext.gregs[REG_EBP];
+               callstack_addrs[count++] =
+                       (long *)ucontext->uc_mcontext.gregs[REG_EIP];
+               while (ebp && (count < size)) {
+                       callstack_addrs[count++] = ebp->ret;
+                       ebp = ebp->ebp;
+               }
+       } else {
+               count = backtrace(callstack_addrs, size);
+       }
+
+       if (count > CALLSTACK_BASE) {
+               count -= CALLSTACK_BASE;
+       } else if (context) {
+               callstack_addrs[CALLSTACK_BASE] = (long *)ucontext->uc_mcontext.gregs[REG_EIP];
+               callstack_addrs[CALLSTACK_BASE + 1] = (long *)ucontext->uc_mcontext.gregs[REG_ESP];
+               count = 2;
+       } else {
+               count = 0;
+       }
+       return count;
+};
diff --git a/src/x86/context.c b/src/x86/context.c
new file mode 100644 (file)
index 0000000..20d37bc
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * SYS-ASSERT
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <stdio.h>
+#include <ucontext.h>
+#include "sys-assert.h"
+#include "util.h"
+
+#define CRASH_REGISTERINFO_TITLE "Register Information"
+
+void dump_registers(int fd, void *context)
+{
+       ucontext_t *ucontext = context;
+       /* for context info */
+       if (!context)
+               return;
+
+       fprintf_fd(fd, "\n%s\n", CRASH_REGISTERINFO_TITLE);
+       fprintf_fd(fd,
+               "gs  = 0x%08x, fs  = 0x%08x\nes  = 0x%08x, ds  = 0x%08x\n",
+               ucontext->uc_mcontext.gregs[REG_GS],
+               ucontext->uc_mcontext.gregs[REG_FS],
+               ucontext->uc_mcontext.gregs[REG_ES],
+               ucontext->uc_mcontext.gregs[REG_DS]);
+       fprintf_fd(fd,
+               "edi = 0x%08x, esi = 0x%08x\nebp = 0x%08x, esp = 0x%08x\n",
+               ucontext->uc_mcontext.gregs[REG_EDI],
+               ucontext->uc_mcontext.gregs[REG_ESI],
+               ucontext->uc_mcontext.gregs[REG_EBP],
+               ucontext->uc_mcontext.gregs[REG_ESP]);
+       fprintf_fd(fd,
+               "eax = 0x%08x, ebx = 0x%08x\necx = 0x%08x, edx = 0x%08x\n",
+               ucontext->uc_mcontext.gregs[REG_EAX],
+               ucontext->uc_mcontext.gregs[REG_EBX],
+               ucontext->uc_mcontext.gregs[REG_ECX],
+               ucontext->uc_mcontext.gregs[REG_EDX]);
+       fprintf_fd(fd,
+               "eip = 0x%08x\n",
+               ucontext->uc_mcontext.gregs[REG_EIP]);
+};
diff --git a/sys-assert/CMakeLists.txt b/sys-assert/CMakeLists.txt
deleted file mode 100644 (file)
index ed1c578..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(sys-assert C)
-
-SET(SRCS
-       src/sys-assert.c
-)
-
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-
-IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-       SET(CMAKE_BUILD_TYPE "Release")
-ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
-MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED
-
-)
-
-FOREACH(flag ${pkgs_CFLAGS})
-       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-SET(CMAKE_C_FLAGS_RELEASE "-O2")
-
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
-IF("${ARCH}" STREQUAL "arm")
-       ADD_DEFINITIONS("-DTARGET")
-       MESSAGE("add -DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-ADD_DEFINITIONS("-DSLP_DEBUG")
-ADD_DEFINITIONS("-DEAPI")
-ADD_DEFINITIONS("-DDEBUG_ON")
-ADD_DEFINITIONS("-DLCD_TYPE_WVGA")
-
-ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -ldl)
-
-INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/.debugmode DESTINATION /usr/opt/etc)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/sys-assert.init.sh DESTINATION /etc/opt/init)
-
-
diff --git a/sys-assert/src/sys-assert.c b/sys-assert/src/sys-assert.c
deleted file mode 100755 (executable)
index 6781c94..0000000
+++ /dev/null
@@ -1,1235 +0,0 @@
-
-/*
- * SYS-ASSERT
- *
- * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Juho Son <juho80.son@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#define _GNU_SOURCE
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <string.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <sys/mman.h>
-#include <execinfo.h>
-#include <dlfcn.h>
-#include <elf.h>
-#include <fcntl.h>
-#include <ucontext.h>
-#include <signal.h>
-#include <linux/unistd.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <time.h>
-/* for PR_SET_DUMPABLE */
-#include <sys/prctl.h>
-#include "sys-assert.h"
-
-#define VERINFO_PATH "/etc/info.ini"
-#define MEMINFO_PATH "/proc/meminfo"
-#define CS_DIR "/opt/share/hidden_storage/SLP_debug/"
-#define DBG_DIR        "/usr/lib/debug"
-#define MAPS_PATH "/proc/self/maps"
-#define EXE_PATH "/proc/self/exe"
-#define CMDLINE_PATH "/proc/self/cmdline"
-
-#define INOTIFY_BS "/opt/bs/curbs.log"
-
-/* 100412 for avatar-factory */
-#define NAME_AVATAR "avatar-factory"
-
-#define SUPPORT_LIBC_BACKTRACE 1
-#define USE_SYMBOL_DB 1
-
-#define FUNC_NAME_MAX_LEN 128
-#define PATH_LEN 256
-#define BUF_SIZE 256
-#define CALLSTACK_SIZE 100
-
-/* permission for open file */
-#define DIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
-/* permission for open file */
-#define FILE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
-
-int sig_to_handle[] = { /* SIGHUP, SIGINT, */ SIGQUIT, SIGILL, /*SIGTRAP, */
-       SIGABRT,        /*SIGIOT, */SIGBUS,
-       SIGFPE, /*SIGKILL, SIGUSR1 */ SIGSEGV,  /*SIGUSR2, */
-       SIGPIPE                 /*SIGXCPU,SIGXFSZ,,, */
-};
-
-#define NUM_SIG_TO_HANDLE      \
-       ((int)(sizeof(sig_to_handle)/sizeof(sig_to_handle[0])))
-
-struct sigaction g_oldact[NUM_SIG_TO_HANDLE];
-
-void sighandler(int signum, siginfo_t *info, void *context)
-{
-       ucontext_t *ucontext = context;
-       void *callstack_addrs[CALLSTACK_SIZE];
-       int cnt_callstack = 0;
-       /* for backtrace_symbols() */
-       char **callstack_strings;
-       struct addr_node *head = NULL;
-       int i;
-       int csfd;               /* file descriptor for cs file */
-       int mapsfd;             /* file descriptor for maps */
-       int meminfo;            /* file descriptor for meminfo */
-       int verinfo;            /* file descriptor for version info */
-       int curbs;              /* for inotify */
-       int cmdlinefd;          /* fd for cmdline */
-
-       /* for get meminfo */
-       char linebuf[BUF_SIZE];
-       char infoname[20];
-       char memsize1[24];
-
-       /* for get app name */
-       char *exename_p = NULL;
-       char exe_path[PATH_LEN];
-       char temp_path[PATH_LEN];
-       char filename_cs[PATH_LEN];
-       char filepath_cs[PATH_LEN];
-
-       pid_t pid;
-       pid_t tid;
-       int thread_use;
-       int redscreen_flg = 0;  /* for determine redscreen */
-       int lauched_by_avatar = 0;
-       /* for determine launched by avatar-factory or not */
-
-       /* get time  */
-       time_t cur_time;
-       struct tm ctime;
-       char timestr[64];
-       cur_time = time(NULL);
-       gmtime_r(&cur_time, &ctime);
-       /*localtime_r(&cur_time, &ctime);*/
-       /*get_localtime(cur_time, &ctime);*/
-       fprintf(stderr, "[sys_assert]START of sighandler\n");
-
-       /* get pid */
-       pid = getpid();
-       tid = (long int)syscall(__NR_gettid);
-
-       /* thread check */
-       if (pid == tid) {
-               thread_use = false;
-               fprintf(stderr,
-                               "[sys_assert]this thread is main thread. pid=%d\n",
-                               pid);
-       } else {
-               thread_use = true;
-               fprintf(stderr,
-                               "[sys_assert]this process is multi-thread process.\
-                               pid=%d, tid=%d\n", pid, tid);
-       }
-
-       /* make debug directory if absent */
-       if (access(CS_DIR, F_OK) == -1) {
-               if (mkdir(CS_DIR, DIR_PERMS) < 0) {
-                       fprintf(stderr,
-                                       "[sys-assert]can't make dir : %s errno : %s\n",
-                                       CS_DIR, strerror(errno));
-                       return;
-               }
-       }
-
-       memset(exe_path, 0, PATH_LEN);
-
-       if ((cmdlinefd = open(CMDLINE_PATH, O_RDONLY)) < 0) {
-               fprintf(stderr, "[sys-assert]can't open %s\n", CMDLINE_PATH);
-       } else {
-               read(cmdlinefd, exe_path, BUF_SIZE - 1);
-               exename_p = remove_path(exe_path);
-               fprintf(stderr, "[sys-assert]exename = %s\n", exename_p);
-       }
-
-       /* added temporary skip  when crash-worker is asserted */
-       if (!strcmp(exename_p, "crash-worker"))
-               return;
-       /* make directory name, file name */
-       strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S", &ctime);
-       if (snprintf(temp_path, PATH_LEN,
-                               "%s_%d_%s", exename_p, pid, timestr) == 0) {
-               fprintf(stderr,
-                               "[sys-assert]can't make temp file name : %s%d\n",
-                               exename_p, pid);
-               return;
-       }
-
-       if (snprintf(filename_cs, PATH_LEN,
-                               "%s.cs", temp_path) == 0) {
-               fprintf(stderr,
-                               "[sys-assert]can't make file name : %s%d\n",
-                               exename_p, pid);
-               return;
-       }
-
-       if (snprintf(filepath_cs, PATH_LEN, "%s%s/", CS_DIR, temp_path) == 0) {
-               fprintf(stderr,
-                               "[sys-assert]can't make file path : %s%s%d.cs\n",
-                               CS_DIR, exename_p, pid);
-               return;
-       }
-
-       /* make dir for cs file */
-       if (mkdir(filepath_cs, DIR_PERMS) < 0) {
-               fprintf(stderr, "[sys-assert]can't make dir : %s\n",
-                               filepath_cs);
-               return;
-       }
-
-       /* complete filepath_cs */
-       strncat(filepath_cs, filename_cs, sizeof(filename_cs));
-
-       /* create cs file */
-       if ((csfd = creat(filepath_cs, FILE_PERMS)) < 0) {
-               fprintf(stderr,
-                               "[sys-assert]can't create %s. errno = %s\n",
-                               filepath_cs, strerror(errno));
-               return;
-       }
-#ifdef BTDEBUG
-       else
-               fprintf(stderr, "[sys-assert]create %s\n", filepath_cs);
-#endif
-       /* check this process is vip/permanent */
-       redscreen_flg = check_redscreen(pid);
-       fprintf_fd(csfd, "%s\n\n", redscreen_flg ? "RED SCREEN" : "BLUE SCREEN");
-       /* print version info */
-       if ((verinfo = open(VERINFO_PATH, O_RDONLY)) < 0) {
-               fprintf(stderr, "[sys-assert]can't open %s\n", VERINFO_PATH);
-       } else {
-               while (fgets_fd(linebuf, BUF_SIZE, verinfo) != NULL) {
-                       if (strncmp("Major=", linebuf, 6) == 0) {
-                               fprintf_fd(csfd, "%s", linebuf);
-                       } else if (strncmp("Minor=", linebuf, 6) == 0) {
-                               fprintf_fd(csfd, "%s", linebuf);
-                       } else if (strncmp("Build=", linebuf, 6) == 0) {
-                               fprintf_fd(csfd, "%s", linebuf);
-                       } else if (strncmp("Date=", linebuf, 5) == 0) {
-                               fprintf_fd(csfd, "%s", linebuf);
-                       } else if (strncmp("Time=", linebuf, 5) == 0) {
-                               fprintf_fd(csfd, "%s", linebuf);
-                               break;
-                       }
-               }
-               close(verinfo);
-       }
-
-       /* print app info */
-       fprintf_fd(csfd, "\nAppName : %s\n", exename_p);
-       fprintf_fd(csfd, "File name : %s\n", filename_cs);
-       fprintf_fd(csfd, "Pid : %d\n", pid);
-       /* print time  */
-       /*localtime_r(&cur_time, &ctime);*/
-       strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S", &ctime);
-       fprintf_fd(csfd, "Date: %s ( UTC )\n", timestr);
-       /* print exe path */
-       fprintf_fd(csfd, "ExePath: %s\n", exe_path);
-       fprintf(stderr, "[sys assert]Exe Path: %s\n", exe_path);
-       if (lauched_by_avatar)
-               fprintf_fd(csfd, "this process is lauched by avatar-factory\n");
-
-       /* print thread info */
-       if (thread_use == true) {
-               fprintf_fd(csfd,
-                               "this process is multi-thread process\npid=%d tid=%d\n",
-                               pid, tid);
-       }
-       /* print signal info */
-       print_signal_info(info, csfd);
-       fsync(csfd);
-
-       /* print additional info */
-#ifdef TARGET
-       fprintf_fd(csfd,
-                       "\nr0 = 0x%08x, r1 = 0x%08x\nr2 = 0x%08x, r3 = 0x%08x\n",
-                       ucontext->uc_mcontext.arm_r0,
-                       ucontext->uc_mcontext.arm_r1,
-                       ucontext->uc_mcontext.arm_r2, ucontext->uc_mcontext.arm_r3);
-       fprintf_fd(csfd,
-                       "r4 = 0x%08x, r5 = 0x%08x\nr6 = 0x%08x, r7 = 0x%08x\n",
-                       ucontext->uc_mcontext.arm_r4,
-                       ucontext->uc_mcontext.arm_r5,
-                       ucontext->uc_mcontext.arm_r6, ucontext->uc_mcontext.arm_r7);
-       fprintf_fd(csfd,
-                       "r8 = 0x%08x, r9 = 0x%08x\nr10 = 0x%08x, fp = 0x%08x\n",
-                       ucontext->uc_mcontext.arm_r8,
-                       ucontext->uc_mcontext.arm_r9,
-                       ucontext->uc_mcontext.arm_r10, ucontext->uc_mcontext.arm_fp);
-       fprintf_fd(csfd,
-                       "ip = 0x%08x, sp = 0x%08x\nlr = 0x%08x, pc = 0x%08x\n",
-                       ucontext->uc_mcontext.arm_ip,
-                       ucontext->uc_mcontext.arm_sp,
-                       ucontext->uc_mcontext.arm_lr, ucontext->uc_mcontext.arm_pc);
-       fprintf_fd(csfd, "cpsr = 0x%08x\n", ucontext->uc_mcontext.arm_cpsr);
-
-#ifdef BTDEBUG
-       fprintf_fd(csfd, "\nfault_address = %p\n",
-                       ucontext->uc_mcontext.fault_address);
-       fprintf_fd(csfd, "uc_stack.ss_sp = %p\n", ucontext->uc_stack.ss_sp);
-       fprintf_fd(csfd, "uc_stack.ss_size = %d\n", ucontext->uc_stack.ss_size);
-#endif
-       fprintf_fd(csfd, "\n");
-
-       /* print meminfo */
-       if ((meminfo = open(MEMINFO_PATH, O_RDONLY)) < 0) {
-               fprintf(stderr, "[sys-assert]can't open %s\n", MEMINFO_PATH);
-       } else {
-               while (fgets_fd(linebuf, BUF_SIZE, meminfo) != NULL) {
-                       sscanf(linebuf, "%s %s %*s", infoname, memsize1);
-                       if (strcmp("MemTotal:", infoname) == 0) {
-                               fprintf_fd(csfd, "%s %s kB\n", infoname,
-                                               memsize1);
-                       } else if (strcmp("MemFree:", infoname) == 0) {
-                               fprintf_fd(csfd, "%s %s kB\n", infoname,
-                                               memsize1);
-                       } else if (strcmp("Buffers:", infoname) == 0) {
-                               fprintf_fd(csfd, "%s  %s kB\n",
-                                               infoname, memsize1);
-                       } else if (strcmp("Cached:", infoname) == 0) {
-                               fprintf_fd(csfd, "%s   %s kB\n",
-                                               infoname, memsize1);
-                               break;
-                       }
-               }
-               close(meminfo);
-       }
-       fprintf_fd(csfd, "\n");
-       /* open maps file */
-       if ((mapsfd = open(MAPS_PATH, O_RDONLY)) < 0) {
-               fprintf_fd(csfd, "Failed to open (%s)\n", MAPS_PATH);
-               fprintf(stderr, "[sys-assert]can't open %s\n", MAPS_PATH);
-       } else {
-#ifdef BTDEBUG
-               fprintf(stderr, "[sys-assert]open %s\n", MAPS_PATH);
-#endif
-               /* parsing the maps to get code segment address */
-               head = get_addr_list_from_maps(mapsfd);
-               close(mapsfd);
-       }
-
-       if (head == NULL) {
-               fprintf_fd(csfd, "Failed to get address list\n");
-               fprintf(stderr, ">>>>error : cannot get address list from maps\n");
-       } else {
-               fprintf_fd(csfd, "\ncallstack information (PID:%d)\n", pid);
-#ifndef SUPPORT_LIBC_BACKTRACE
-               /* backtrace using fp */
-               {
-                       long *SP;       /* point to the top of stack */
-                       long *PC;       /* point to the program counter */
-                       long *BP = __libc_stack_end;
-                       long *FP;
-                       long *framep;
-                       /* get sp , pc and bp */
-                       SP = (long *)ucontext->uc_mcontext.arm_sp;
-                       PC = (long *)ucontext->uc_mcontext.arm_pc;
-                       FP = (long *)ucontext->uc_mcontext.arm_fp;
-                       framep = (long *)FP;
-
-                       callstack_addrs[cnt_callstack++] =
-                               (long *)ucontext->uc_mcontext.arm_pc;
-#ifdef BTDEBUG
-                       print_node_to_file(head, 2);
-#endif
-                       if (FP != NULL) {
-                               for (; framep < BP;) {
-                                       if (is_valid_addr(framep, head) == false)
-                                               break;
-
-                                       if (is_valid_addr((long *)*framep, head) == false)
-                                               break;
-
-                                       callstack_addrs[cnt_callstack] = (long *)*framep;
-
-                                       framep--;
-                                       framep = (long *)(*framep);
-                                       cnt_callstack++;
-
-                                       if (cnt_callstack == CALLSTACK_SIZE)
-                                               break;
-                                       if (framep < FP)
-                                               break;
-                               }
-                       }
-                       fprintf_fd(csfd, "cnt_callstack = %d\n", cnt_callstack);
-                       /* print callstack */
-                       if (false ==
-                                       trace_symbols(callstack_addrs, cnt_callstack, head, csfd)) {
-                               callstack_strings =
-                                       backtrace_symbols(callstack_addrs, cnt_callstack);
-                               /* print callstack information */
-                               for (i = 0; i < cnt_callstack; i++)
-                                       fprintf_fd(csfd, "%2d: %s\n", i, callstack_strings[i]);
-                       }
-                       if (FP == NULL)
-                               fprintf_fd(csfd,
-                                               "there is no callstack because of fp == NULL\n");
-                       }
-#else          /*SUPPORT_LIBC_BACKTRACE*/
-               cnt_callstack = backtrace(callstack_addrs, CALLSTACK_SIZE);
-               if (cnt_callstack > 2) {
-                       cnt_callstack -= 2;
-               } else {
-                       callstack_addrs[2] = (long *)ucontext->uc_mcontext.arm_pc;
-                       callstack_addrs[3] = (long *)ucontext->uc_mcontext.arm_lr;
-                       cnt_callstack = 2;
-               }
-               fprintf_fd(csfd, "cnt_callstack = %d\n", cnt_callstack);
-
-               /* print callstack */
-               if (false ==
-                               trace_symbols(&callstack_addrs[2], cnt_callstack, head, csfd)) {
-                       fprintf(stderr, "[sys-assert] trace_symbols failed\n");
-               }
-#endif
-               fprintf_fd(csfd, "end of call stack\n");
-               /* print maps information */
-               print_node_to_file(head, csfd);
-               free_all_nodes(head);
-               }
-#else          /* i386 */
-               fprintf_fd(csfd, "\ncallstack information (PID:%d)\n", pid);
-
-               layout *ebp = ucontext->uc_mcontext.gregs[REG_EBP];
-               callstack_addrs[cnt_callstack++] =
-                       (long *)ucontext->uc_mcontext.gregs[REG_EIP];
-               while (ebp) {
-                       callstack_addrs[cnt_callstack++] = ebp->ret;
-                       ebp = ebp->ebp;
-               }
-               callstack_strings = backtrace_symbols(callstack_addrs, cnt_callstack);
-               /* print callstack information */
-               for (i = 0; i < cnt_callstack; i++)
-                       fprintf_fd(csfd, "%2d: %s\n", i, callstack_strings[i]);
-               fprintf_fd(csfd, "end of call stack\n");
-#endif
-       /* cs file sync */
-       fsync(csfd);
-       /* clean up */
-       if (close(csfd) == -1)
-               fprintf(stderr, "[sys-assert] csfd close error!!\n");
-       /* core dump set */
-       if (prctl(PR_GET_DUMPABLE) == 0) {
-               fprintf(stderr, "[sys-assert]set PR_SET_DUMPABLE to 1\n");
-               prctl(PR_SET_DUMPABLE, 1);
-       }
-       /* INOTIFY BS */
-       if ((curbs = open(INOTIFY_BS, O_RDWR | O_APPEND)) < 0) {
-               fprintf(stderr, "[sys-assert]cannot make %s !\n", INOTIFY_BS);
-       } else {
-               fprintf_fd(curbs, "%s %s\n",
-                               filepath_cs, redscreen_flg ? "RED" : "BLUE");
-               close(curbs);
-       }
-       for (i = 0; i < NUM_SIG_TO_HANDLE; i++) {
-               if (sig_to_handle[i] == signum) {
-                       sigaction(signum, &g_oldact[i], NULL);
-                       fprintf(stderr,
-                                       "sighandler = %p, g_sig_oldact[i] = %p\n",
-                                       (void *)sighandler, g_oldact[i].sa_handler);
-                       break;
-               }
-       }
-       raise(signum);
-       fprintf(stderr, "[sys_assert]END of sighandler\n");
-}
-
-__attribute__ ((constructor))
-void init()
-{
-       pid_t pid;
-       pid = getpid();
-       int i;
-       for (i = 0; i < NUM_SIG_TO_HANDLE; i++) {
-               struct sigaction act;
-               act.sa_handler = (void *)sighandler;
-               sigemptyset(&act.sa_mask);
-               act.sa_flags = SA_SIGINFO;
-               act.sa_flags |= SA_RESETHAND;
-               if (sigaction(sig_to_handle[i], &act, &g_oldact[i]) < 0) {
-                       perror("[sys-assert]could not set signal handler ");
-                       continue;
-               }
-       }
-}
-
-#ifdef TARGET
-/* get function symbol from elf */
-static int
-trace_symbols(void *const *array, int size, struct addr_node *start, int csfd)
-{
-       int cnt;
-       Dl_info info_funcs;
-#ifndef USE_SYMBOL_DB
-       int i;
-       Elf32_Ehdr elf_h;
-       Elf32_Shdr *s_headers;
-       int strtab_index = 0;
-       int symtab_index = 0;
-       int num_st = 0;
-       Elf32_Sym *symtab_entry;
-       int fd;
-       int ret;
-       char filename[256];
-#endif
-       unsigned int offset_addr;
-       unsigned int start_addr;
-       unsigned int addr;
-
-       for (cnt = 0; cnt < size; cnt++) {
-#ifndef USE_SYMBOL_DB
-               num_st = 0;
-#endif
-               /* FIXME : for walking on stack trace */
-               if (dladdr(array[cnt], &info_funcs) == 0) {
-                       fprintf(stderr, "[sys-assert]dladdr returnes error!\n");
-                       /* print just address */
-                       fprintf_fd(csfd, "%2d: (%p)\n", cnt, array[cnt]);
-
-                       continue;
-               }
-               start_addr = (unsigned int)get_start_addr(array[cnt], start);
-               addr = (unsigned int)array[cnt];
-
-/* because of launchpad,
- * return value of dladdr when find executable is wrong.
- * so fix dli_fname here */
-               if (info_funcs.dli_fbase == (void *)0x8000
-                   &&
-                   (strncmp
-                    ("/opt/apps/", info_funcs.dli_fname,
-                     strlen("/opt/apps/")) == 0)) {
-                       fprintf(stderr,
-                                       "[sys-assert][%d]\
-                                       fname = %s, fbase = %p, sname = %s, saddr = %p\n",
-                                       cnt, info_funcs.dli_fname,
-                                       info_funcs.dli_fbase,
-                                       info_funcs.dli_sname, info_funcs.dli_saddr);
-                       info_funcs.dli_fname = get_fpath(array[cnt], start);
-                       offset_addr = addr;
-                       fprintf(stderr,
-                                       "[sys-assert][%d]\
-                                       start_addr : %x, addr : %x, offset_addr : %x \n",
-                                       cnt, start_addr, addr, offset_addr);
-               } else {
-                       offset_addr = addr - start_addr;
-               }
-               if (info_funcs.dli_sname == NULL) {
-#ifndef USE_SYMBOL_DB
-/*FIXME : get dbg file name from debuglink and search dbg file in DBG_DIR */
-                       strcpy(filename, DBG_DIR);
-                       strncat(filename, info_funcs.dli_fname, 128);
-
-                       fd = open(filename, O_RDONLY);
-                       if (fd < 0) {
-                               fprintf_fd(csfd,
-                                               "%2d: (%p) [%s]+%p\n",
-                                               cnt, array[cnt],
-                                               info_funcs.dli_fname, offset_addr);
-                               continue;
-                       }
-
-                       ret = read(fd, &elf_h, sizeof(Elf32_Ehdr));
-                       if (ret < sizeof(Elf32_Ehdr)) {
-                               fprintf(stderr,
-                                               "[sys-assert]readnum = %d, [%s]\n",
-                                               ret, info_funcs.dli_fname);
-                               fprintf_fd(csfd,
-                                               "%2d: (%p) [%s]+%p\n",
-                                               cnt, array[cnt],
-                                               info_funcs.dli_fname, offset_addr);
-                               continue;
-                       }
-
-                       if (elf_h.e_type == ET_EXEC) {
-                               info_funcs.dli_fbase = 0;
-                               offset_addr = addr;
-                       }
-                       s_headers =
-                           (Elf32_Shdr *) mmap(0,
-                                               elf_h.e_shnum *
-                                               sizeof
-                                               (Elf32_Shdr),
-                                               PROT_READ |
-                                               PROT_WRITE,
-                                               MAP_PRIVATE |
-                                               MAP_ANONYMOUS, -1, 0);
-
-                       if (s_headers == NULL) {
-                               fprintf(stderr, "[sys-assert]malloc failed\n");
-                               fprintf_fd(csfd,
-                                               "%2d: (%p) [%s]+%p\n",
-                                               cnt, array[cnt],
-                                               info_funcs.dli_fname, offset_addr);
-                               continue;
-                       }
-                       lseek(fd, elf_h.e_shoff, SEEK_SET);
-
-                       if (elf_h.e_shentsize > sizeof(Elf32_Shdr))
-                               return false;
-
-                       for (i = 0; i < elf_h.e_shnum; i++) {
-                               ret =
-                                   read(fd, &s_headers[i], elf_h.e_shentsize);
-                               if (ret < elf_h.e_shentsize) {
-                                       fprintf(stderr,
-                                                       "[sys-assert]read error\n");
-                                       munmap(s_headers,
-                                              elf_h.e_shnum *
-                                              sizeof(Elf32_Shdr));
-                                       return false;
-                               }
-                       }
-
-                       for (i = 0; i < elf_h.e_shnum; i++) {
-/* find out .symtab Section index */
-                               if (s_headers[i].sh_type == SHT_SYMTAB) {
-                                       symtab_index = i;
-                                       num_st =
-                                           s_headers[i].sh_size /
-                                           s_headers[i].sh_entsize;
-/* number of .symtab entry */
-                                       break;
-                               }
-                       }
-
-                       /*.strtab index */
-                       strtab_index = s_headers[symtab_index].sh_link;
-                       symtab_entry =
-                           (Elf32_Sym *)mmap(0, sizeof(Elf32_Sym) * num_st,
-                                             PROT_READ | PROT_WRITE,
-                                             MAP_PRIVATE | MAP_ANONYMOUS, -1,
-                                             0);
-                       if (symtab_entry == NULL) {
-                               fprintf(stderr, "[sys-assert]malloc failed\n");
-                               munmap(s_headers,
-                                      elf_h.e_shnum * sizeof(Elf32_Shdr));
-                               return false;
-                       }
-                       lseek(fd, s_headers[symtab_index].sh_offset, SEEK_SET);
-
-                       for (i = 0; i < num_st; i++) {
-                               ret =
-                                   read(fd, &symtab_entry[i],
-                                        sizeof(Elf32_Sym));
-
-                               if (ret < sizeof(Elf32_Sym)) {
-                                       fprintf(stderr,
-                                                       "[sys-assert]symtab_entry[%d],\
-                                                       num_st=%d, readnum = %d\n",
-                                                       i, num_st, ret);
-                                       break;
-                               }
-
-                               if (((info_funcs.dli_fbase +
-                                     symtab_entry[i].st_value)
-                                    <= array[cnt])
-                                   && (array[cnt] <=
-                                       (info_funcs.dli_fbase +
-                                        symtab_entry
-                                        [i].st_value +
-                                        symtab_entry[i].st_size))) {
-                                       if (symtab_entry[i].st_shndx !=
-                                           STN_UNDEF) {
-                                               lseek(fd,
-                                                     s_headers
-                                                     [strtab_index].sh_offset +
-                                                     symtab_entry[i].st_name,
-                                                     SEEK_SET);
-                                               info_funcs.dli_sname = (void *)
-                                                   mmap(0,
-                                                        FUNC_NAME_MAX_LEN,
-                                                        PROT_READ
-                                                        |
-                                                        PROT_WRITE,
-                                                        MAP_PRIVATE
-                                                        |
-                                                        MAP_ANONYMOUS, -1, 0);
-                                               ret =
-                                                   read(fd,
-                                                        info_funcs.dli_sname,
-                                                        FUNC_NAME_MAX_LEN);
-                                               info_funcs.dli_saddr =
-                                                   info_funcs.dli_fbase +
-                                                   symtab_entry[i].st_value;
-                                       }
-                                       break;
-                               }
-                       }
-
-                       munmap(s_headers, elf_h.e_shnum * sizeof(Elf32_Shdr));
-                       munmap(symtab_entry, sizeof(Elf32_Sym) * num_st);
-                       close(fd);
-#endif
-                       fprintf_fd(csfd, "%2d: (%p) [%s]+%p\n",
-                                  cnt, array[cnt],
-                                  info_funcs.dli_fname, offset_addr);
-               } else {
-
-                       if (array[cnt] >= info_funcs.dli_saddr) {
-                               fprintf_fd(csfd,
-                                          "%2d: %s+0x%x(%p) [%s]+%p\n",
-                                          cnt,
-                                          info_funcs.dli_sname,
-                                          (array[cnt] -
-                                           info_funcs.dli_saddr),
-                                          array[cnt],
-                                          info_funcs.dli_fname, offset_addr);
-                       } else {
-                               fprintf_fd(csfd,
-                                          "%2d: %s-0x%x(%p) [%s]+%p\n",
-                                          cnt,
-                                          info_funcs.dli_sname,
-                                          (info_funcs.dli_saddr
-                                           - array[cnt]),
-                                          array[cnt],
-                                          info_funcs.dli_fname, offset_addr);
-                       }
-               }
-       }
-
-       return true;
-
-}
-#endif
-
-/* get address list from maps */
-static struct addr_node *get_addr_list_from_maps(int mapsfd)
-{
-       int result;
-       char linebuf[BUF_SIZE];
-       char addr[20];
-       char perm[5];
-       char path[PATH_LEN];
-
-       long *saddr;
-       long *eaddr;
-       int fpath_len;
-
-       struct addr_node *head = NULL;
-       struct addr_node *tail = NULL;
-       struct addr_node *t_node = NULL;
-
-/* parsing the maps to get executable code address */
-       while (fgets_fd(linebuf, BUF_SIZE, mapsfd) != NULL) {
-#ifdef BTDEBUG
-               fprintf(stderr, "%s", linebuf);
-#endif
-               memset(path, 0, PATH_LEN);
-               result =
-                   sscanf(linebuf, "%s %s %*s %*s %*s %s ", addr, perm, path);
-               perm[4] = 0;
-#ifdef BTDEBUG
-               fprintf(stderr,
-                               "addr = %s, perm = %s, fpath = %s, length=%d\n",
-                               addr, perm, path, strlen(path));
-#endif
-/*if perm[2]=='x',addr is valid value so we have to store the address */
-#ifdef TARGET
-               if ((perm[2] == 'x' && path[0] == '/')
-                               || (perm[1] == 'w' && path[0] != '/'))
-#else
-               if (strncmp(perm, "r-xp", 4) == 0)
-#endif
-               {
-                       /* add addr node to list */
-                       addr[8] = 0;
-                       saddr = (long *)strtoul(addr, NULL, 16);
-                       eaddr = (long *)strtoul(&addr[9], NULL, 16);
-
-                       /* make node and attach to the list */
-                       t_node =
-                           (struct addr_node *)mmap(0,
-                                                    sizeof
-                                                    (struct
-                                                     addr_node),
-                                                    PROT_READ |
-                                                    PROT_WRITE,
-                                                    MAP_PRIVATE
-                                                    | MAP_ANONYMOUS, -1, 0);
-                       if (t_node == NULL) {
-                               fprintf(stderr, "error : mmap\n");
-                               return NULL;
-                       }
-                       memcpy(t_node->perm, perm, 5);
-                       t_node->startaddr = saddr;
-                       t_node->endaddr = eaddr;
-                       t_node->fpath = NULL;
-                       fpath_len = strlen(path);
-                       if (fpath_len > 0) {
-                               t_node->fpath =
-                                   (char *)mmap(0,
-                                                fpath_len + 1,
-                                                PROT_READ |
-                                                PROT_WRITE,
-                                                MAP_PRIVATE |
-                                                MAP_ANONYMOUS, -1, 0);
-                               memset(t_node->fpath, 0, fpath_len + 1);
-                               memcpy(t_node->fpath, path, fpath_len);
-                       } else {
-                               t_node->fpath =
-                                   (char *)mmap(0, 8,
-                                                PROT_READ |
-                                                PROT_WRITE,
-                                                MAP_PRIVATE |
-                                                MAP_ANONYMOUS, -1, 0);
-                               memset(t_node->fpath, 0, 8);
-                               memcpy(t_node->fpath, "[anony]", 7);
-                       }
-
-                       t_node->next = NULL;
-                       if (head == NULL) {
-                               head = t_node;
-                               tail = t_node;
-                       } else {
-                               tail->next = t_node;
-                               tail = t_node;
-                       }
-               }
-#ifdef BTDEBUG
-               fprintf(stderr, "end of while loop\n");
-#endif
-       }
-       return head;
-}
-
-static void print_node_to_file(struct addr_node *start, int fd)
-{
-       struct addr_node *t_node;
-       t_node = start;
-
-       fprintf(stderr, "[sys-assert]start print_node_to_file\n");
-
-       fprintf_fd(fd, "\nmaps  information\n\n");
-       while (t_node) {
-               if (!strncmp("[anony]", t_node->fpath, strlen("[anony]"))
-                               && (0x4508a000 < (unsigned int)t_node->startaddr)) {
-                       t_node = t_node->next;
-               } else {
-                       fprintf_fd(fd, "%08x %08x %s %s\n",
-                               (unsigned int)t_node->startaddr,
-                               (unsigned int)t_node->endaddr,
-                               t_node->perm, t_node->fpath);
-                       t_node = t_node->next;
-               }
-       }
-       fprintf_fd(fd, "end of maps information\n");
-}
-
-#ifdef BTDEBUG
-static void print_node(struct addr_node *start)
-{
-       struct addr_node *t_node;
-       t_node = start;
-       while (t_node) {
-               printf("[%08x-%08x]\n",
-                      (unsigned int)t_node->startaddr,
-                      (unsigned int)t_node->endaddr);
-               t_node = t_node->next;
-       }
-}
-#endif
-
-static void free_all_nodes(struct addr_node *start)
-{
-       struct addr_node *t_node, *n_node;
-       int fpath_len;
-       if (start == NULL)
-               return;
-
-       t_node = start;
-       n_node = t_node->next;
-
-       while (t_node) {
-               if (t_node->fpath != NULL) {
-                       fpath_len = strlen(t_node->fpath);
-                       munmap(t_node->fpath, fpath_len + 1);
-               }
-               munmap(t_node, sizeof(struct addr_node));
-               if (n_node == NULL)
-                       break;
-               t_node = n_node;
-               n_node = n_node->next;
-       }
-}
-
-static long *get_start_addr(long *value, struct addr_node *start)
-{
-       struct addr_node *t_node;
-       struct addr_node *n_node;
-       t_node = start;
-       n_node = t_node->next;
-#ifdef BTDEBUG
-       fprintf(stderr, "in is_valid_addr(), value %p ", value);
-#endif
-       if (value == 0 || start == NULL) {
-#ifdef BTDEBUG
-               fprintf(stderr, "is invalid address\n");
-#endif
-               return NULL;
-       }
-
-       while (t_node) {
-               if (t_node->endaddr <= value) {
-                       /* next node */
-                       if (n_node == NULL) {
-#ifdef BTDEBUG
-                               fprintf(stderr, "is invalid address\n");
-#endif
-                               return NULL;
-                       }
-                       t_node = n_node;
-                       n_node = n_node->next;
-               } else if (t_node->startaddr <= value) {
-#ifdef BTDEBUG
-                       fprintf(stderr, "is valid address\n");
-                       fprintf(stderr,
-                                       "value = %p \n t_node->startaddr = %p\n\
-                                       t_node->fpath =%s\n",
-                                       value, t_node->startaddr, t_node->fpath);
-#endif
-                       return t_node->startaddr;
-               } else {
-#ifdef BTDEBUG
-                       fprintf(stderr, "is invalid address\n");
-#endif
-                       return NULL;
-               }
-       }
-#ifdef BTDEBUG
-       fprintf(stderr, "is invalid address\n");
-#endif
-       return NULL;
-}
-
-static char *get_fpath(long *value, struct addr_node *start)
-{
-       struct addr_node *t_node;
-       struct addr_node *n_node;
-       t_node = start;
-       n_node = t_node->next;
-       if (value == 0 || start == NULL)
-               return NULL;
-
-       while (t_node) {
-               if (t_node->endaddr <= value) {
-                       /* next node */
-                       if (n_node == NULL)
-                               return NULL;
-                       t_node = n_node;
-                       n_node = n_node->next;
-               } else if (t_node->startaddr <= value) {
-                       return t_node->fpath;
-               } else {
-                       return NULL;
-               }
-       }
-       return NULL;
-}
-
-static void print_signal_info(const siginfo_t *info, int fd)
-{
-
-       int signum = info->si_signo;
-       fprintf_fd(fd, "\nSignal: %d\n", signum);
-       switch (signum) {
-       case SIGINT:
-               fprintf_fd(fd, "      (SIGINT)\n");
-               break;
-       case SIGILL:
-               fprintf_fd(fd, "      (SIGILL)\n");
-               break;
-       case SIGABRT:
-               fprintf_fd(fd, "      (SIGABRT)\n");
-               break;
-       case SIGBUS:
-               fprintf_fd(fd, "      (SIGBUS)\n");
-               break;
-       case SIGFPE:
-               fprintf_fd(fd, "      (SIGFPE)\n");
-               break;
-       case SIGKILL:
-               fprintf_fd(fd, "      (SIGKILL)\n");
-               break;
-       case SIGSEGV:
-               fprintf_fd(fd, "      (SIGSEGV)\n");
-               break;
-       case SIGPIPE:
-               fprintf_fd(fd, "      (SIGPIPE)\n");
-               break;
-       default:
-               fprintf_fd(fd, "\n");
-       }
-
-       /* print signal si_code info */
-       fprintf_fd(fd, "      si_code: %d\n", info->si_code);
-
-       if (info->si_code <= 0 || info->si_code >= 0x80) {
-               switch (info->si_code) {
-#ifdef SI_TKILL
-               case SI_TKILL:
-                       /* FIXME : print exe name displace with info->si_pid */
-                       fprintf_fd(fd,
-                                  "      signal sent by tkill (sent by pid %d, uid %d)\n",
-                                  info->si_pid, info->si_uid);
-                       fprintf_fd(fd, "      TIMER: %d\n", SI_TIMER);
-                       break;
-#endif
-#ifdef SI_USER
-               case SI_USER:
-                       /* FIXME : print exe name displace with info->si_pid */
-                       fprintf_fd(fd,
-                                  "      signal sent by kill (sent by pid %d, uid %d)\n",
-                                  info->si_pid, info->si_uid);
-                       break;
-#endif
-#ifdef SI_KERNEL
-               case SI_KERNEL:
-                       fprintf_fd(fd, "      signal sent by the kernel\n");
-                       break;
-#endif
-               }
-
-       } else if (signum == SIGILL) {
-               switch (info->si_code) {
-               case ILL_ILLOPC:
-                       fprintf_fd(fd, "      illegal opcode\n");
-                       break;
-               case ILL_ILLOPN:
-                       fprintf_fd(fd, "      illegal operand\n");
-                       break;
-               case ILL_ILLADR:
-                       fprintf_fd(fd, "      illegal addressing mode\n");
-                       break;
-               case ILL_ILLTRP:
-                       fprintf_fd(fd, "      illegal trap\n");
-                       break;
-               case ILL_PRVOPC:
-                       fprintf_fd(fd, "      privileged opcode\n");
-                       break;
-               case ILL_PRVREG:
-                       fprintf_fd(fd, "      privileged register\n");
-                       break;
-               case ILL_COPROC:
-                       fprintf_fd(fd, "      coprocessor error\n");
-                       break;
-               case ILL_BADSTK:
-                       fprintf_fd(fd, "      internal stack error\n");
-                       break;
-               default:
-                       fprintf_fd(fd, "      illegal si_code = %d\n", info->si_code);
-                       break;
-               }
-               fprintf_fd(fd, "      si_addr: %p\n", info->si_addr);
-       } else if (signum == SIGFPE) {
-               switch (info->si_code) {
-               case FPE_INTDIV:
-                       fprintf_fd(fd, "      integer divide by zero\n");
-                       break;
-               case FPE_INTOVF:
-                       fprintf_fd(fd, "      integer overflow\n");
-                       break;
-               case FPE_FLTDIV:
-                       fprintf_fd(fd, "      floating-point divide by zero\n");
-                       break;
-               case FPE_FLTOVF:
-                       fprintf_fd(fd, "      floating-point overflow\n");
-                       break;
-               case FPE_FLTUND:
-                       fprintf_fd(fd, "      floating-point underflow\n");
-                       break;
-               case FPE_FLTRES:
-                       fprintf_fd(fd, "      floating-point inexact result\n");
-                       break;
-               case FPE_FLTINV:
-                       fprintf_fd(fd, "      invalid floating-point operation\n");
-                       break;
-               case FPE_FLTSUB:
-                       fprintf_fd(fd, "      subscript out of range\n");
-                       break;
-               default:
-                       fprintf_fd(fd, "      illegal si_code: %d\n", info->si_code);
-                       break;
-               }
-       } else if (signum == SIGSEGV) {
-               switch (info->si_code) {
-               case SEGV_MAPERR:
-                       fprintf_fd(fd, "      address not mapped to object\n");
-                       break;
-               case SEGV_ACCERR:
-                       fprintf_fd(fd,
-                                  "      invalid permissions for mapped object\n");
-                       break;
-               default:
-                       fprintf_fd(fd, "      illegal si_code: %d\n", info->si_code);
-                       break;
-               }
-               fprintf_fd(fd, "      si_addr = %p\n", info->si_addr);
-       } else if (signum == SIGBUS) {
-               switch (info->si_code) {
-               case BUS_ADRALN:
-                       fprintf_fd(fd, "      invalid address alignment\n");
-                       break;
-               case BUS_ADRERR:
-                       fprintf_fd(fd, "      nonexistent physical address\n");
-                       break;
-               case BUS_OBJERR:
-                       fprintf_fd(fd, "      object-specific hardware error\n");
-                       break;
-               default:
-                       fprintf_fd(fd, "      illegal si_code: %d\n", info->si_code);
-                       break;
-               }
-               fprintf_fd(fd, "      si_addr: %p\n", info->si_addr);
-
-       }
-}
-
-char *fgets_fd(char *s, int n, int fd)
-{
-       char c;
-       register char *cs;
-       int num = 0;
-
-       cs = s;
-       while (--n > 0 && (num = read(fd, &c, 1) > 0)) {
-               if ((*cs++ = c) == '\n')
-                       break;
-       }
-       *cs = '\0';
-       return (num == 0 && cs == s) ? NULL : s;
-}
-
-/* WARNING : formatted string buffer is limited to 1024 byte */
-int fprintf_fd(int fd, const char *fmt, ...)
-{
-       int n;
-       char buff[1024];
-       va_list args;
-       va_start(args, fmt);
-       n = vsnprintf(buff, 1024 - 1, fmt, args);
-       write(fd, buff, n);
-       va_end(args);
-       return n;
-}
-
-static char *remove_path(const char *cmd)
-{
-       char *t;
-       char *r;
-
-       t = r = (char *)cmd;
-
-       while (*t) {
-               if (*t == '/')
-                       r = t + 1;
-               t++;
-       }
-       return r;
-}
-
-#define VIP_PATH               "/tmp/vip"
-#define PERMANENT_PATH "/tmp/permanent"
-
-static int check_redscreen(int pid)
-{
-       DIR *dp;
-       struct dirent *dirp;
-       char pid_str[10];
-       snprintf(pid_str, 10, "%d", pid);
-
-       if ((dp = opendir(VIP_PATH)) == NULL) {
-               return 0;
-       } else {
-               while ((dirp = readdir(dp)) != NULL) {
-                       if (strcmp(dirp->d_name, pid_str) == 0) {
-                               fprintf(stderr, "pid=%d is VIP process\n", pid);
-                               closedir(dp);
-                               return 1;
-                       }
-               }
-       }
-       closedir(dp);
-
-       if ((dp = opendir(PERMANENT_PATH)) == NULL) {
-               return 0;
-       } else {
-               while ((dirp = readdir(dp)) != NULL) {
-                       if (strcmp(dirp->d_name, pid_str) == 0) {
-                               fprintf(stderr,
-                                       "pid=%d is Permanent process\n", pid);
-                               closedir(dp);
-                               return 1;
-                       }
-               }
-       }
-       closedir(dp);
-       return 0;
-
-}
-/*localtime() can not use in signal handler,
-so we need signal safe version of localtime */
-static inline void get_localtime(time_t cur_time, struct tm *ctime)
-{
-       int tday[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
-       int time_var = cur_time;
-       int i = 0;
-       ctime->tm_sec = time_var % 60;
-       time_var /= 60;
-       ctime->tm_min = time_var % 60;
-       time_var /= 60;
-
-       /* do we need to fix up timze zone ? */
-       ctime->tm_hour = time_var % 24;
-       time_var /= 24;
-
-       int year = 1970;
-       int leak_year = 0;
-
-       while (time_var > 365 + (leak_year = (((year % 4) == 0)
-                                       && ((year % 100) != 0))
-                               || ((year % 400) == 0))) {
-               time_var = time_var - 365 - leak_year;
-               year++;
-       }
-
-       ctime->tm_year = year;
-       leak_year = (((year % 4) == 0) && ((year % 100) != 0))
-           || ((year % 400) == 0);
-       time_var++;
-
-       while (time_var > tday[i]) {
-               time_var -= tday[i];
-               if (i == 1)
-                       time_var -= leak_year;
-               i++;
-       }
-
-       ctime->tm_mon = ++i;
-       ctime->tm_mday = time_var;
-
-       fprintf(stderr, "local time %d %d %d %d:%d:%d\n",
-                       ctime->tm_year, ctime->tm_mon, ctime->tm_mday,
-                       ctime->tm_hour, ctime->tm_min, ctime->tm_sec);
-}
diff --git a/sys-assert/src/sys-assert.h b/sys-assert/src/sys-assert.h
deleted file mode 100755 (executable)
index c3d1d0c..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/*
- * SYS-ASSERT
- *
- * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Juho Son <Juho80.son@samsung.com> Youngkyeong Yun <yk.yun@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-#ifndef _DEBUG_ASSERT_H_
-#define _DEBUG_ASSERT_H_
-
-#include <time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-       struct addr_node {
-               long *startaddr;
-               long *endaddr;
-               char perm[5];
-               char *fpath;
-               struct addr_node *next;
-       };
-
-#ifdef __arm__
-       typedef struct layout {
-               struct layout *fp;
-               void *ret;
-       } layout;
-
-#else
-       typedef struct layout {
-               struct layout *ebp;
-               void *ret;
-       } layout;
-#endif
-
-       extern void *__libc_stack_end;
-
-       static int trace_symbols(void *const *array, int size,
-                                struct addr_node *start, int csfd);
-
-       static struct addr_node *get_addr_list_from_maps(int mapsfd);
-       static void print_node_to_file(struct addr_node *start, int fd);
-
-#ifdef BTDEBUG
-       static void print_node(struct addr_node *start);
-#endif
-       static void free_all_nodes(struct addr_node *start);
-
-       static long *get_start_addr(long *value, struct addr_node *start);
-
-       static char *get_fpath(long *value, struct addr_node *start);
-
-       static void print_signal_info(const siginfo_t *info, int fd);
-
-       char *fgets_fd(char *s, int n, int fd);
-
-       int fprintf_fd(int fd, const char *fmt, ...);
-
-       static char *remove_path(const char *cmd);
-
-       static int check_redscreen(int pid);
-
-       inline static void get_localtime(time_t cur_time, struct tm *ctime);
-
-#ifdef __cplusplus
-}
-#endif
-#endif                         /* _DEBUG_ASSERT_H_ */
diff --git a/sys-assert/sys-assert.init.sh b/sys-assert/sys-assert.init.sh
deleted file mode 100644 (file)
index 64ca916..0000000
+++ /dev/null
@@ -1 +0,0 @@
-cp /usr/opt/etc/.debugmode  /opt/etc/.debugmode
diff --git a/sys-assert/sys-assert.pc b/sys-assert/sys-assert.pc
deleted file mode 100755 (executable)
index 0e7185c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: sys-assert
-Description: for debugging
-Version: 1.0
-Requires: 
-Libs: -L${libdir} 
-Cflags: -I${includedir}