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 2021/07/20 12:43:48 UTC

[GitHub] [incubator-nuttx] acassis opened a new pull request #4187: Fix xtensa_btdump() to look at the exception frame

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


   ## Summary
   While debugging a division by zero on NuttX and passing the bt to decoder script it was returning the current sp instruction:
   ```
   $ ./tools/esp32/btdecode.sh backtrace.txt
   0x400d75ca: xtensa_dumpstate at xtensa_dumpstate.c:289 (discriminator 4)
   0x400d6a72: xtensa_assert at xtensa_assert.c:93
   0x400d6b91: xtensa_user_panic at xtensa_assert.c:320 (discriminator 4)
   0x400d69f1: xtensa_user at esp32_user.c:438
   0x400808f5: _xtensa_user_handler at xtensa_user_handler.S:257
   0x00040020: ?? ??:0
   ```
   After the fix, it was able to indicate correctly where the issue was happening:
   ```
   $ ./tools/esp32/btdecode.sh backtrace.txt
   0x401395f6: __udivmoddi4 at libgcc2.c:1091
    (inlined by) __udivdi3 at libgcc2.c:1320
   0x400826fd: btdm_us_2_lpcycles at esp32_ble_adapter.c:1464
   0x4003c166: ?? ??:0
   0x4003c3bc: ?? ??:0
   0x4012b8fe: r_ld_init_hark at ??:?
   0x40055199: ?? ??:0
   0x40134c76: r_rwip_init at ??:?
   0x401253df: r_rw_pre_main at arch_main.c:?
   0x40125954: btdm_controller_task at ??:?
   0x400d24c5: nxtask_start at task_start.c:125
   ```
   The issue was found by Ivan Grokhotkov from Espressif
   ## Impact
   Now people could use the bt decoding to debug NuttX crashes
   ## Testing
   ESP32-Devkit
   


-- 
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] acassis commented on a change in pull request #4187: Fix xtensa_btdump() to look at the exception frame

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



##########
File path: arch/xtensa/src/common/xtensa_dumpstate.c
##########
@@ -232,7 +232,11 @@ static inline void xtensa_btdump(void)
   int i;
   bool corrupted = false;
 
-  xtensa_backtrace_start(&pc, &sp, &npc);

Review comment:
       No, it is not used anywhere else. Ok, I will remove it!




-- 
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 #4187: Fix xtensa_btdump() to look at the exception frame

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


   


-- 
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] igrr commented on a change in pull request #4187: Fix xtensa_btdump() to look at the exception frame

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



##########
File path: arch/xtensa/src/common/xtensa_dumpstate.c
##########
@@ -232,7 +232,11 @@ static inline void xtensa_btdump(void)
   int i;
   bool corrupted = false;
 
-  xtensa_backtrace_start(&pc, &sp, &npc);

Review comment:
       is xtensa_backtrace_start still used anywhere? if not, maybe arch/xtensa/src/common/xtensa_dumpstate.c can be removed?




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