task: show thread main entry when display thread name
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
parent
3d2ffed8ae
commit
3462061624
@ -718,8 +718,9 @@ static ssize_t proc_cmdline(FAR struct proc_file_s *procfile,
|
||||
{
|
||||
FAR struct pthread_tcb_s *ptcb = (FAR struct pthread_tcb_s *)tcb;
|
||||
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, " %p\n",
|
||||
ptcb->arg);
|
||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
|
||||
" %p %p\n",
|
||||
ptcb->cmn.entry.main, ptcb->arg);
|
||||
copysize = procfs_memcpy(procfile->line, linesize, buffer,
|
||||
remaining, &offset);
|
||||
|
||||
|
@ -251,7 +251,8 @@ static void dump_task(struct tcb_s *tcb, void *arg)
|
||||
{
|
||||
struct pthread_tcb_s *ptcb = (struct pthread_tcb_s *)tcb;
|
||||
|
||||
snprintf(args, sizeof(args), " %p", ptcb->arg);
|
||||
snprintf(args, sizeof(args), " %p %p",
|
||||
ptcb->cmn.entry.main, ptcb->arg);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -443,16 +444,18 @@ void _assert(FAR const char *filename, int linenum)
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
# if CONFIG_TASK_NAME_SIZE > 0
|
||||
_alert("Assertion failed CPU%d at file:%s line: %d task: %s\n",
|
||||
up_cpu_index(), filename, linenum, running_task()->name);
|
||||
_alert("Assertion failed CPU%d at file:%s line: %d task: %s %p\n",
|
||||
up_cpu_index(), filename, linenum, running_task()->name,
|
||||
running_task()->entry.main);
|
||||
# else
|
||||
_alert("Assertion failed CPU%d at file:%s line: %d\n",
|
||||
up_cpu_index(), filename, linenum);
|
||||
# endif
|
||||
#else
|
||||
# if CONFIG_TASK_NAME_SIZE > 0
|
||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, linenum, running_task()->name);
|
||||
_alert("Assertion failed at file:%s line: %d task: %s %p\n",
|
||||
filename, linenum, running_task()->name,
|
||||
running_task()->entry.main);
|
||||
# else
|
||||
_alert("Assertion failed at file:%s line: %d\n",
|
||||
filename, linenum);
|
||||
|
Loading…
Reference in New Issue
Block a user