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 2020/12/10 12:16:50 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2504: Xtensa: Get full backtrace from interrupts.

xiaoxiang781216 commented on a change in pull request #2504:
URL: https://github.com/apache/incubator-nuttx/pull/2504#discussion_r540120901



##########
File path: arch/xtensa/src/common/xtensa_int_handlers.S
##########
@@ -187,6 +187,29 @@ g_intstackbase:
 	and		a6, a6, a3				/* a6 = Set of pending, enabled interrupts for this level */
 	beqz	a6, 1f						/* Nothing to do */
 
+  /* At this point, the exception frame should have been allocated and filled,
+   * and current sp points to the interrupt stack (if enabled). Copy the
+   * pre-exception's base save area below the current SP.
+   */
+
+#ifdef CONFIG_XTENSA_INTBACKTRACE
+  rsr  a0, EXCSAVE_1 + \level - 1  /* Get exception frame pointer stored in EXCSAVE_x */

Review comment:
       should we align the code?

##########
File path: arch/xtensa/src/common/xtensa_int_handlers.S
##########
@@ -280,6 +303,10 @@ _xtensa_level1_handler:
 	rsr		a0, EXCSAVE_1					            /* Save interruptee's a0 */
 	s32i	a0, sp, (4 * REG_A0)
 
+#ifdef CONFIG_XTENSA_INTBACKTRACE
+  wsr sp, EXCSAVE_1

Review comment:
       should we align the code here and other place?




----------------------------------------------------------------
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.

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