add spaces where they are required

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
remove spaces where they are prohibited

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
use tabs for code indent

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
add helper attribute __printf

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
fix trivial coding style errors

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
logger: add function to show backtrace

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
add helper function to set signal handlers

To avoid infinite recursive call, this patch also sets SA_RESETHAND if
the handler should be called when program terminates.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
show backtrace when program exits unexpectedly

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>