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/04/22 13:49:27 UTC
[GitHub] [incubator-nuttx] Ouss4 opened a new pull request, #6136: Fix backtrace on exceptions
Ouss4 opened a new pull request, #6136:
URL: https://github.com/apache/incubator-nuttx/pull/6136
## Summary
Full backtrace was not available, because the code responsable for retrieving the correct registers (A0 and A1) was reading them from an incorrect SP.
## Impact
Xtensa
## Testing
before:
```gdb
(gdb) bt
#0 xtensa_assert () at common/xtensa_assert.c:129
#1 0x400d402e in xtensa_user_panic (exccause=29, regs=0x3ffe0b88) at common/xtensa_assert.c:311
#2 0x400d39a6 in xtensa_user (exccause=29, regs=0x3ffe0b88) at chip/esp32_user.c:438
#3 0x4008086f in _xtensa_user_handler () at common/xtensa_user_handler.S:276
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
```
after
```gdb
(gdb) bt
#0 xtensa_assert () at common/xtensa_assert.c:129
#1 0x400d402e in xtensa_user_panic (exccause=29, regs=0x3ffe0b88) at common/xtensa_assert.c:311
#2 0x400d39a6 in xtensa_user (exccause=29, regs=0x3ffe0b88) at chip/esp32_user.c:438
#3 0x40080875 in _xtensa_user_handler () at common/xtensa_user_handler.S:282
#4 0x400dd66a in hello_main (argc=0, argv=0x0) at hello_main.c:40
#5 0x400d2607 in nxtask_startup (entrypt=0x400dd65c <hello_main>, argc=1, argv=0x3ffe0480) at sched/task_startup.c:70
#6 0x400d13e3 in nxtask_start () at task/task_start.c:133
```
--
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
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6136: xtensa: Fix backtrace on exceptions
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6136:
URL: https://github.com/apache/incubator-nuttx/pull/6136
--
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
[GitHub] [incubator-nuttx] Ouss4 commented on a diff in pull request #6136: xtensa: Fix backtrace on exceptions
Posted by GitBox <gi...@apache.org>.
Ouss4 commented on code in PR #6136:
URL: https://github.com/apache/incubator-nuttx/pull/6136#discussion_r856386255
##########
arch/xtensa/src/common/xtensa_user_handler.S:
##########
@@ -220,6 +220,10 @@ _xtensa_user_handler:
s32i a0, sp, (4 * REG_A0)
s32i a2, sp, (4 * REG_A2)
+#ifdef CONFIG_XTENSA_INTBACKTRACE
+ wsr sp, EXCSAVE_1
Review Comment:
Thanks, fixed!
--
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
[GitHub] [incubator-nuttx] gustavonihei commented on a diff in pull request #6136: xtensa: Fix backtrace on exceptions
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on code in PR #6136:
URL: https://github.com/apache/incubator-nuttx/pull/6136#discussion_r856278972
##########
arch/xtensa/src/common/xtensa_user_handler.S:
##########
@@ -220,6 +220,10 @@ _xtensa_user_handler:
s32i a0, sp, (4 * REG_A0)
s32i a2, sp, (4 * REG_A2)
+#ifdef CONFIG_XTENSA_INTBACKTRACE
+ wsr sp, EXCSAVE_1
Review Comment:
```suggestion
wsr sp, EXCSAVE_1
```
nit: alignment
--
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
[GitHub] [incubator-nuttx] Ouss4 commented on pull request #6136: xtensa: Fix backtrace on exceptions
Posted by GitBox <gi...@apache.org>.
Ouss4 commented on PR #6136:
URL: https://github.com/apache/incubator-nuttx/pull/6136#issuecomment-1106683130
@gustavonihei I added one small commit since last review, PTAL.
--
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