arch/risc-v: Fix debugging syscall info

This commit fixes an issue when `CONFIG_DEBUG_SYSCALL_INFO=y`: the
`cmd` variable doesn't exist (instead, `regs[REG_A0]` represents
the syscall command directly. Also, it fixes the parameter for
`up_dump_register`, as `tcb` is a pointer here. By applying these
fixes, debugging syscall info is now possible again.
This commit is contained in:
Tiago Medicci Serrano
2025-06-20 14:11:40 -03:00
committed by Xiang Xiao
parent 9f84695ef7
commit a98f7a1045
+2 -2
View File
@@ -312,10 +312,10 @@ int riscv_swint(int irq, void *context, void *arg)
*/
#ifdef CONFIG_DEBUG_SYSCALL_INFO
if (cmd <= SYS_switch_context)
if (regs[REG_A0] <= SYS_switch_context)
{
svcinfo("SWInt Return: Context switch!\n");
up_dump_register(tcb.xcp.regs);
up_dump_register(tcb->xcp.regs);
}
else
{