pussuw commented on a change in pull request #5782:
URL: https://github.com/apache/incubator-nuttx/pull/5782#discussion_r834587806



##########
File path: arch/risc-v/src/common/riscv_assert.c
##########
@@ -338,6 +338,10 @@ static void riscv_dumpstate(void)
   else
     {
       riscv_saveusercontext(rtcb->xcp.regs);
+
+      /* riscv_saveusercontext modifies the local context (a0), restore it */
+
+      rtcb = running_task();

Review comment:
       The prototype of riscv_saveusercontext indicates that it modifies the 
return value in context (a0,which is rtcb). I just did what the prototype 
indicated. So yes, indeed, rtcb will not be preserved as it is destroyed by 
riscv_saveusercontext .




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to