This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 1757ecc5c15c79baab1492d08bafe1722a396ef9
Author: chenxiaoyi <[email protected]>
AuthorDate: Tue Sep 24 11:40:56 2024 +0800

    xtensa: add backtrace link from syscall exception
    
    Signed-off-by: chenxiaoyi <[email protected]>
---
 arch/xtensa/src/common/xtensa_user_handler.S | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/xtensa/src/common/xtensa_user_handler.S 
b/arch/xtensa/src/common/xtensa_user_handler.S
index 2475b81b6d..ad5936f2d0 100644
--- a/arch/xtensa/src/common/xtensa_user_handler.S
+++ b/arch/xtensa/src/common/xtensa_user_handler.S
@@ -282,6 +282,13 @@ _xtensa_syscall_handler:
 
        ps_setup        1 a0
 
+       /* Link the pre-exception frame for debugging. At this point, a12 
points to the
+        * allocated and filled exception stack frame (old value of SP in case 
of
+        * an interrupt stack).
+        */
+
+       exception_backtrace a12 1
+
        movi    ARG1, XTENSA_IRQ_SYSCALL                        /* Argument 1: 
IRQ number */
        mov             ARG2, a12                                               
        /* Argument 2: Top of stack = register save area */
        CALL    xtensa_irq_dispatch                                     /* Call 
xtensa_int_decode */

Reply via email to