Commit 1672f6ce authored by Daniel Leung's avatar Daniel Leung Committed by Christopher Friedt
Browse files

debug: thread_info: stack pointer is not supported for xtensa



Xtensa does not store the stack pointers in thread objects but
pushing the registers into the stack. There is no fixed location
to retrieve the stack pointer so mark it as unimplemented to
avoid the #warning.

Fixes #38405

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent f79fbeab
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -80,6 +80,13 @@ size_t _kernel_thread_info_offsets[] = {
#elif defined(CONFIG_ARCH_POSIX)
	[THREAD_INFO_OFFSET_T_STACK_PTR] = offsetof(struct k_thread,
						callee_saved.thread_status),
#elif defined(CONFIG_XTENSA)
	/* Xtensa does not store stack pointers inside thread objects.
	 * The registers are saved in thread stack where there is
	 * no fixed location for this to work. So mark this as
	 * unimplemented to avoid the #warning below.
	 */
	[THREAD_INFO_OFFSET_T_STACK_PTR] = THREAD_INFO_UNIMPLEMENTED,
#else
	/* Use a special value so that OpenOCD knows that obtaining the stack
	 * pointer is not possible on this particular architecture.