This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 624fc5a9b8b1f1500f199fb594ab337ce2552d5f Author: yinshengkai <[email protected]> AuthorDate: Tue Jun 25 11:33:47 2024 +0800 sched: support dumping all file information during assert Signed-off-by: yinshengkai <[email protected]> --- sched/misc/assert.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sched/misc/assert.c b/sched/misc/assert.c index ea0910046e..31419abaec 100644 --- a/sched/misc/assert.c +++ b/sched/misc/assert.c @@ -27,6 +27,7 @@ #include <nuttx/arch.h> #include <nuttx/board.h> #include <nuttx/coredump.h> +#include <nuttx/fs/fs.h> #include <nuttx/irq.h> #include <nuttx/tls.h> #include <nuttx/signal.h> @@ -414,6 +415,18 @@ static void dump_backtrace(FAR struct tcb_s *tcb, FAR void *arg) } #endif +/**************************************************************************** + * Name: dump_filelist + ****************************************************************************/ + +#ifdef CONFIG_SCHED_DUMP_ON_EXIT +static void dump_filelist(FAR struct tcb_s *tcb, FAR void *arg) +{ + FAR struct filelist *filelist = &tcb->group->tg_filelist; + files_dumplist(filelist); +} +#endif + /**************************************************************************** * Name: dump_tasks ****************************************************************************/ @@ -495,6 +508,10 @@ static void dump_tasks(void) #ifdef CONFIG_SCHED_BACKTRACE nxsched_foreach(dump_backtrace, NULL); #endif + +#ifdef CONFIG_SCHED_DUMP_ON_EXIT + nxsched_foreach(dump_filelist, NULL); +#endif } /****************************************************************************
