You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/25 06:21:29 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6665: arch/stack: get correct stack remain and limit dump size when sp is not within stack

xiaoxiang781216 commented on code in PR #6665:
URL: https://github.com/apache/incubator-nuttx/pull/6665#discussion_r928505053


##########
arch/arm/src/common/arm_assert.c:
##########
@@ -411,6 +425,11 @@ static void arm_dumpstate(void)
   /* Dump the user stack */
 
   arm_dump_stack("User", sp,
+#ifdef CONFIG_STACK_COLORATION
+                 up_check_stack_remain(),

Review Comment:
   let's rename do_stackcheck to arm_check_stack and call this function inside arm_dump_stack?



##########
arch/arm/src/common/arm_assert.c:
##########
@@ -335,7 +337,7 @@ static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
  * Name: arm_dump_stack
  ****************************************************************************/
 
-static void arm_dump_stack(const char *tag, uint32_t sp,
+static void arm_dump_stack(const char *tag, uint32_t sp, ssize_t remain,

Review Comment:
   ssize_t to uint32_t



##########
arch/arm/src/common/arm_checkstack.c:
##########
@@ -209,12 +209,12 @@ ssize_t up_check_tcbstack_remain(struct tcb_s *tcb)
 
 size_t up_check_stack(void)
 {
-  return up_check_tcbstack(this_task());
+  return up_check_tcbstack(running_task());

Review Comment:
   let's update arm64 too



##########
arch/xtensa/src/common/xtensa_dumpstate.c:
##########
@@ -44,6 +44,12 @@
 
 #ifdef CONFIG_DEBUG_ALERT
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define STACKDUMP_SIZE 8192

Review Comment:
   let's update the risc-v too



-- 
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-unsubscribe@nuttx.apache.org

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