debug: openocd: Support for building on SPARC

This adds the pieces needed for openocd.c to compile when ARCH=SPARC.
In particular, it allows the tracing.osawareness.openocd sample to
build and run.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
This commit is contained in:
Martin Åberg 2020-11-11 19:58:54 +01:00 committed by Andrew Boie
parent b5bab421b7
commit 2b1baf6e33

View file

@ -71,6 +71,9 @@ size_t _kernel_openocd_offsets[] = {
#elif defined(CONFIG_RISCV)
[OPENOCD_OFFSET_T_STACK_PTR] = offsetof(struct k_thread,
callee_saved.sp),
#elif defined(CONFIG_SPARC)
[OPENOCD_OFFSET_T_STACK_PTR] = offsetof(struct k_thread,
callee_saved.o6),
#else
/* Use a special value so that OpenOCD knows that obtaining the stack
* pointer is not possible on this particular architecture.