You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/17 03:04:19 UTC
[nuttx] 02/02: assert: add stackbase dump
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 940de60892a9a6d11eb3b15f0c436bd134e0f10e
Author: ligd <li...@xiaomi.com>
AuthorDate: Wed Jan 11 11:57:07 2023 +0800
assert: add stackbase dump
Signed-off-by: ligd <li...@xiaomi.com>
---
sched/misc/assert.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/sched/misc/assert.c b/sched/misc/assert.c
index d6afe4bb67..760cce4cc8 100644
--- a/sched/misc/assert.c
+++ b/sched/misc/assert.c
@@ -329,6 +329,7 @@ static void dump_task(FAR struct tcb_s *tcb, FAR void *arg)
#ifdef CONFIG_SMP
" %4d"
#endif
+ " %p"
" %7zu"
#ifdef CONFIG_STACK_COLORATION
" %7zu %3zu.%1zu%%%c"
@@ -341,6 +342,7 @@ static void dump_task(FAR struct tcb_s *tcb, FAR void *arg)
#ifdef CONFIG_SMP
, tcb->cpu
#endif
+ , tcb->stack_base_ptr
, tcb->adj_stack_size
#ifdef CONFIG_STACK_COLORATION
, up_check_tcbstack(tcb)
@@ -391,11 +393,12 @@ static void show_tasks(void)
/* Dump interesting properties of each task in the crash environment */
- _alert(" PID PRI"
+ _alert(" PID PRI"
#ifdef CONFIG_SMP
" CPU"
#endif
- " STACK"
+ " STACKBASE"
+ " STACKSIZE"
#ifdef CONFIG_STACK_COLORATION
" USED FILLED "
#endif
@@ -405,10 +408,11 @@ static void show_tasks(void)
" COMMAND\n");
#if CONFIG_ARCH_INTERRUPTSTACK > 0
- _alert(" ---- ----"
+ _alert(" ---- ---"
# ifdef CONFIG_SMP
" ----"
# endif
+ " %p"
" %7u"
# ifdef CONFIG_STACK_COLORATION
" %7zu %3zu.%1zu%%%c"
@@ -417,6 +421,7 @@ static void show_tasks(void)
" ----"
# endif
" irq\n"
+ , up_get_intstackbase()
, CONFIG_ARCH_INTERRUPTSTACK
# ifdef CONFIG_STACK_COLORATION
, stack_used