add backtrace in unix_signal_handler 70/13070/5
authorKingwel Xie <kingwel.xie@ericsson.com>
Fri, 15 Jun 2018 08:56:24 +0000 (04:56 -0400)
committerDamjan Marion <dmarion@me.com>
Tue, 26 Jun 2018 15:02:16 +0000 (15:02 +0000)
commit497deaf72f98dd104d9c9999a877ddd2f04c0aa6
treefb86987cf2cebdc4e4cf34d310cebc97541dc708
parent6fb0d9b269057a40b6979c741f8c1187b653d12d
add backtrace in unix_signal_handler

crash stack backtrace will be directed to syslog

1. make use of glic backtrace in execinfo.h. the old clib_backtrace is removed
2. install SIGABRT in signal handler, but have to remove it when backtrace is
   done. reason is to capture stack trace caused by SIGABRT. vPP ASSERT always
   call os_exit then abort().  we definitely want to know the trace of this
   situation. It is a little tricky to avoid SIGABRT infinite loop
3. always load symbols by calling  clib_elf_main_init () in main(). Otherwise,
   PC addresses instead of symbols will be displayed.

Change-Id: I150e15b94a4620b2ea4f08c73dc3e6ad1856de1e
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
src/vlib/unix/main.c [changed mode: 0644->0755]
src/vppinfra/backtrace.c [changed mode: 0644->0755]