hitHuang commented on code in PR #19528:
URL: https://github.com/apache/nuttx/pull/19528#discussion_r3653909469


##########
arch/risc-v/src/common/riscv_backtrace.c:
##########
@@ -25,11 +25,81 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+#include <stdbool.h>
 #include <nuttx/arch.h>
 #include <nuttx/addrenv.h>
+#include <nuttx/compiler.h>
 #include "sched/sched.h"
 #include "riscv_internal.h"
 
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+/* Maximum number of independent starting points up_backtrace() can splice
+ * together.  Current worst case: the main fp chain (possibly starting on
+ * the interrupt or kernel stack) plus the xcp.sregs splice used to reach
+ * the user call site of a task that is mid-syscall.
+ */
+
+#define BT_MAX_SEGMENTS 2
+
+/* Upper bound on how many candidate ranges a single segment can
+ * register: interrupt stack, kernel stack, user stack.
+ */
+
+#define BT_MAX_RANGES 3
+
+/* One candidate stack range a segment's fp chain may be walking. */
+
+struct bt_range_s

Review Comment:
   done



##########
arch/risc-v/src/common/riscv_backtrace.c:
##########
@@ -25,11 +25,81 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+#include <stdbool.h>
 #include <nuttx/arch.h>
 #include <nuttx/addrenv.h>
+#include <nuttx/compiler.h>
 #include "sched/sched.h"
 #include "riscv_internal.h"
 
+/****************************************************************************
+ * Private Types

Review Comment:
   done



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to