mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
arch/arm64: fix backtrace register access and gdbstub config guard
Fix arm64_backtrace to access TCB register context directly instead of using running_regs(), which may not reflect the actual context being backtraced. Add CONFIG_ARCH_HAVE_DEBUG guard to prevent undefined references in non-debug builds. Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
f3f9b7ecae
commit
2a08860a08
2 changed files with 3 additions and 3 deletions
|
|
@ -162,8 +162,8 @@ int up_backtrace(struct tcb_s *tcb,
|
|||
{
|
||||
ret = backtrace(tcb->stack_base_ptr,
|
||||
tcb->stack_base_ptr + tcb->adj_stack_size,
|
||||
running_regs()[REG_X29],
|
||||
running_regs()[REG_ELR],
|
||||
(void *)(tcb->xcp.regs)[REG_X29],
|
||||
(void *)(tcb->xcp.regs)[REG_ELR],
|
||||
buffer, size, &skip);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ static const struct memory_region_s g_memory_region[] =
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#if defined(CONFIG_SMP) && defined(CONFIG_ARCH_HAVE_DEBUG)
|
||||
static struct smp_call_data_s g_call_data;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue