Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp32c3/nsh: enable dumpstack/backtrace #7831

Merged
merged 1 commit into from Dec 8, 2022

Conversation

anchao
Copy link
Contributor

@anchao anchao commented Dec 8, 2022

Summary

esp32c3/nsh: enable dumpstack/backtrace

Dump task stack:

| nsh> ps
|   PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK COMMAND
|     0     0   0 FIFO     Kthread N-- Ready              00000000 002016 Idle Task
|     1     1 100 RR       Task    --- Running            00000000 001984 nsh_main
| nsh> dumpstack 0 100
| backtrace| 0: 0x4200764a 0x3fc82d60 0x420000b2 0x42000044
| backtrace| 1: 0x42007e98 0x420036b4 0x4201043c 0x42010450 0x4200cab0 0x42008fec 0x42009294 0x42008454
| backtrace| 1: 0x42007fbe 0x42007f54 0x42006200 0x4200432c
| backtrace| 2: 0x42013ec0 0x420119bc 0x42013abc 0x42006200 0x4200432c

address to line:

| $ riscv64-unknown-elf-addr2line -e nuttx 0x42007e98 0x420036b4 0x4201043c 0x42010450 0x4200cab0 0x42008fec 0x42009294 0x42008454
| nuttx/include/arch/syscall.h:238
| nuttx/sched/semaphore/sem_wait.c:201
| 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:543
| apps/nshlib/nsh_parse.c:2736
| apps/nshlib/nsh_session.c:234

Signed-off-by: chao an anchao@xiaomi.com

Impact

N/A

Testing

ci-check

Dump task stack:
| nsh> ps
|   PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK COMMAND
|     0     0   0 FIFO     Kthread N-- Ready              00000000 002016 Idle Task
|     1     1 100 RR       Task    --- Running            00000000 001984 nsh_main
| nsh> dumpstack 0 100
| backtrace| 0: 0x4200764a 0x3fc82d60 0x420000b2 0x42000044
| backtrace| 1: 0x42007e98 0x420036b4 0x4201043c 0x42010450 0x4200cab0 0x42008fec 0x42009294 0x42008454
| backtrace| 1: 0x42007fbe 0x42007f54 0x42006200 0x4200432c
| backtrace| 2: 0x42013ec0 0x420119bc 0x42013abc 0x42006200 0x4200432c

address to line:
| $ riscv64-unknown-elf-addr2line -e nuttx 0x42007e98 0x420036b4 0x4201043c 0x42010450 0x4200cab0 0x42008fec 0x42009294 0x42008454
| nuttx/include/arch/syscall.h:238
| nuttx/sched/semaphore/sem_wait.c:201
| 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:543
| apps/nshlib/nsh_parse.c:2736
| apps/nshlib/nsh_session.c:234

Signed-off-by: chao an <anchao@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit ee72f92 into apache:master Dec 8, 2022
@jerpelea jerpelea added this to To-Add in Release Notes - 12.0.0 Dec 29, 2022
@jerpelea jerpelea moved this from To-Add to Added in Release Notes - 12.0.0 Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants