Fix and refactoring of code used to get registers on crash.
authorantirez <antirez@gmail.com>
Tue, 24 Apr 2012 09:07:15 +0000 (11:07 +0200)
committerantirez <antirez@gmail.com>
Tue, 24 Apr 2012 09:11:35 +0000 (11:11 +0200)
commita66a4963498d08094fc16c2b0afe6faf8ad512b0
tree2c31210505b7207099ee0d1bbeb0327b8f93b5ea
parentc4a4755286f6d7df99ba40f83ffb3874807fe83e
Fix and refactoring of code used to get registers on crash.

This fixes compilation on FreeBSD (and possibly other systems) by
not using ucontext_t at all if HAVE_BACKTRACE is not defined.
Also the ifdefs to get the registers are modified to explicitly test for the
operating system in the first level, and the arch in the second level
of nesting.
src/debug.c