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/09 08:16:23 UTC

[GitHub] [incubator-nuttx] Ouss4 opened a new pull request #2504: Xtensa: Get full backtrace from interrupts.

Ouss4 opened a new pull request #2504:
URL: https://github.com/apache/incubator-nuttx/pull/2504


   ## Summary
   The main addition of this PR is the ability to have a full backtrace from interrupt handlers.
   ## Impact
   N/A the option is disabled by default.
   ## Testing
   Tested on ESP32 boards.
   


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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [incubator-nuttx] acassis merged pull request #2504: Xtensa: Get full backtrace from interrupts.

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #2504:
URL: https://github.com/apache/incubator-nuttx/pull/2504


   


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



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

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #2504:
URL: https://github.com/apache/incubator-nuttx/pull/2504#discussion_r540167805



##########
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:
       @xiaoxiang781216 this one is already merged, I'll submit another one some time during this week to fix some style issues.




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