diff --git a/arch/risc-v/src/common/riscv_assert.c b/arch/risc-v/src/common/riscv_assert.c index 4fcaf7b2c0..3844823ce4 100644 --- a/arch/risc-v/src/common/riscv_assert.c +++ b/arch/risc-v/src/common/riscv_assert.c @@ -332,8 +332,7 @@ static void riscv_dumpstate(void) if (CURRENT_REGS) { - memcpy(rtcb->xcp.regs, - (uintptr_t *)CURRENT_REGS, XCPTCONTEXT_SIZE); + rtcb->xcp.regs = (uintptr_t *)CURRENT_REGS; } else {