anchao opened a new pull request, #7260:
URL: https://github.com/apache/incubator-nuttx/pull/7260

   ## Summary
   
   arm/backtrace: add support for EHABI(Exception Handling ABI) stack unwinder
   
   Reference:
   https://github.com/ARM-software/abi-aa/blob/main/ehabi32/ehabi32.rst 
https://github.com/ARM-software/abi-aa/releases/download/2022Q1/ehabi32.pdf
   
   Signed-off-by: chao an <anc...@xiaomi.com>
   
   ## Impact
   
   N/A
   
   ## Testing
   
   lm3s6965-ek/qemu-flat
   
   ```
   $ qemu-system-arm -semihosting -M lm3s6965evb -device 
loader,file=nuttx.bin,addr=0x00000000 -netdev user,id=user0 -nic user,id=user0 
-serial mon:stdio -nographic 
   ABCDF
   
   NuttShell (NSH) NuttX-10.4.0
   nsh> ps
     PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK   
USED  FILLED COMMAND
       0     0   0 FIFO     Kthread N-- Ready              00000000 001000 
000372  37.2%  Idle Task
       1     1 224 RR       Kthread --- Waiting  Semaphore 00000000 001992 
000280  14.0%  hpwork 0x20000970
       2     2 100 RR       Task    --- Running            00000000 002000 
001144  57.2%  nsh_main
   nsh> dumpstack 0
   [ 3] backtrace| 0: 0x00005f18 0x00002120
   nsh> dumpstack 1
   [ 7] backtrace| 1: 0x00006326 0x0000631c 0x00003010 0x00003038 0x00002a6a 
0x0000286e
   nsh> dumpstack 2
   [11] backtrace| 2: 0x00006326 0x0000631c 0x00003010 0x00010f74 0x00010f82 
0x0000a90c 0x00006fda 0x00007bfe
   [11] backtrace| 2: 0x00006ada 0x0000677c 0x00006732 0x00004b96 0x00002884
   nsh> dumpstack
   [15] backtrace|15: 0x00015c8a 0x0001242e 0x000141fc 0x00004b96 0x00002884
   nsh> 
   
   ```
   
   ```
   Thread 0 (Idle Task):
   $ arm-none-eabi-addr2line -e nuttx 0x00005f18 0x00002120
   nuttx/arch/arm/src/chip/common/tiva_idle.c:59
   nuttx/sched/init/nx_start.c:690 (discriminator 1)
   
   Thread 1 (hpwork):
   $ arm-none-eabi-addr2line -e nuttx 0x00006326 0x0000631c 0x00003010 
0x00003038 0x00002a6a 0x0000286e
   nuttx/include/arch/syscall.h:186
   nuttx/arch/arm/src/common/arm_blocktask.c:136
   nuttx/sched/semaphore/sem_wait.c:155 (discriminator 2)
   nuttx/sched/semaphore/sem_wait.c:224 (discriminator 1)
   nuttx/sched/wqueue/kwork_thread.c:147
   nuttx/sched/task/task_start.c:129
   
   Thread 2 (nsh_main):
   $ arm-none-eabi-addr2line -e nuttx 0x00006326 0x0000631c 0x00003010 
0x00010f74 0x00010f82 0x0000a90c 0x00006fda 0x00007bfe 0x00006ada 0x0000677c 
0x00006732 0x00004b96 0x00002884
   nuttx/include/arch/syscall.h:186
   nuttx/arch/arm/src/common/arm_blocktask.c:136
   nuttx/sched/semaphore/sem_wait.c:155 (discriminator 2)
   nuttx/sched/sched/sched_waitpid.c:127
   nuttx/sched/sched/sched_waitpid.c:597
   apps/nshlib/nsh_builtin.c:160
   apps/nshlib/nsh_parse.c:530
   apps/nshlib/nsh_parse.c:2594
   apps/nshlib/nsh_session.c:217
   apps/nshlib/nsh_consolemain.c:106 (discriminator 2)
   apps/system/nsh/nsh_main.c:154
   nuttx/libs/libc/sched/task_startup.c:70 (discriminator 2)
   nuttx/sched/task/task_start.c:134
   
   Thread 15 (dumpstack self):
   $ arm-none-eabi-addr2line -e nuttx 0x00015c8a 0x0001242e 0x000141fc 
0x00004b96 0x00002884
   arm_backtrace_unwind.c:?
   nuttx/libs/libc/sched/sched_dumpstack.c:69
   apps/system/dumpstack/dumpstack.c:65 (discriminator 1)
   nuttx/libs/libc/sched/task_startup.c:70 (discriminator 2)
   nuttx/sched/task/task_start.c:134
   
   ```


-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to