mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 09:45:55 +08:00
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:
committed by
Xiang Xiao
parent
9f84695ef7
commit
a98f7a1045
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user