debug: Wrap rb_backtrace with HAVE_RB_BACKTRACE instead of CPU_ARM

Basically, preparation for a non-ARM backtrace support.

Change-Id: Icfd09fbc65a98f859e2a19f8d1111827a262a969
This commit is contained in:
Solomon Peachy 2018-08-06 21:52:11 -04:00
parent b5fb9781a6
commit 74dd276fe1
2 changed files with 6 additions and 1 deletions

View file

@ -253,6 +253,11 @@ static inline void cpu_boost_unlock(void)
#define MIN_STACK_ALIGN 8
#endif
/* Define this if target has support for generating backtraces */
#ifdef CPU_ARM
#define HAVE_RB_BACKTRACE
#endif
#ifndef MIN_STACK_ALIGN
#define MIN_STACK_ALIGN (sizeof (uintptr_t))
#endif

View file

@ -114,7 +114,7 @@ void panicf( const char *fmt, ...)
}
}
#if defined(CPU_ARM)
#if defined(HAVE_RB_BACKTRACE)
rb_backtrace(pc, sp, &y);
#endif
#ifdef ROCKBOX_HAS_LOGF