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:17 UTC
[nuttx] branch master updated (8bd0d441ae -> 940de60892)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
from 8bd0d441ae minidumpserver: replace stackdump to stack_dump
new 4de9317373 assert: add uname info to assert message
new 940de60892 assert: add stackbase dump
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
sched/misc/assert.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
[nuttx] 02/02: assert: add stackbase dump
Posted by xi...@apache.org.
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
[nuttx] 01/02: assert: add uname info to assert message
Posted by xi...@apache.org.
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 4de931737354fc395e985195098fc8855738e3ba
Author: ligd <li...@xiaomi.com>
AuthorDate: Fri Dec 30 14:17:32 2022 +0800
assert: add uname info to assert message
Signed-off-by: ligd <li...@xiaomi.com>
---
sched/misc/assert.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sched/misc/assert.c b/sched/misc/assert.c
index 11700194a4..d6afe4bb67 100644
--- a/sched/misc/assert.c
+++ b/sched/misc/assert.c
@@ -38,6 +38,7 @@
#include <debug.h>
#include <stdio.h>
#include <stdint.h>
+#include <sys/utsname.h>
#include "irq/irq.h"
#include "sched/sched.h"
@@ -439,6 +440,7 @@ static void show_tasks(void)
void _assert(FAR const char *filename, int linenum)
{
FAR struct tcb_s *rtcb = running_task();
+ struct utsname name;
bool fatal = false;
/* Flush any buffered SYSLOG data (from prior to the assertion) */
@@ -457,6 +459,11 @@ void _assert(FAR const char *filename, int linenum)
panic_notifier_call_chain(fatal ? PANIC_KERNEL : PANIC_TASK, rtcb);
+ uname(&name);
+ _alert("Current Version: %s %s %s %s %s\n",
+ name.sysname, name.nodename,
+ name.release, name.version, name.machine);
+
#ifdef CONFIG_SMP
# if CONFIG_TASK_NAME_SIZE > 0
_alert("Assertion failed CPU%d at file: %s:%d task: %s %p\n",