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;
|
FAR struct pthread_tcb_s *ptcb = (FAR struct pthread_tcb_s *)tcb;
|
||||||
|
|
||||||
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN, " %p\n",
|
linesize = procfs_snprintf(procfile->line, STATUS_LINELEN,
|
||||||
ptcb->arg);
|
" %p %p\n",
|
||||||
|
ptcb->cmn.entry.main, ptcb->arg);
|
||||||
copysize = procfs_memcpy(procfile->line, linesize, buffer,
|
copysize = procfs_memcpy(procfile->line, linesize, buffer,
|
||||||
remaining, &offset);
|
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;
|
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
|
else
|
||||||
#endif
|
#endif
|
||||||
@ -443,16 +444,18 @@ void _assert(FAR const char *filename, int linenum)
|
|||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
# if CONFIG_TASK_NAME_SIZE > 0
|
# if CONFIG_TASK_NAME_SIZE > 0
|
||||||
_alert("Assertion failed CPU%d at file:%s line: %d task: %s\n",
|
_alert("Assertion failed CPU%d at file:%s line: %d task: %s %p\n",
|
||||||
up_cpu_index(), filename, linenum, running_task()->name);
|
up_cpu_index(), filename, linenum, running_task()->name,
|
||||||
|
running_task()->entry.main);
|
||||||
# else
|
# else
|
||||||
_alert("Assertion failed CPU%d at file:%s line: %d\n",
|
_alert("Assertion failed CPU%d at file:%s line: %d\n",
|
||||||
up_cpu_index(), filename, linenum);
|
up_cpu_index(), filename, linenum);
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# if CONFIG_TASK_NAME_SIZE > 0
|
# if CONFIG_TASK_NAME_SIZE > 0
|
||||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
_alert("Assertion failed at file:%s line: %d task: %s %p\n",
|
||||||
filename, linenum, running_task()->name);
|
filename, linenum, running_task()->name,
|
||||||
|
running_task()->entry.main);
|
||||||
# else
|
# else
|
||||||
_alert("Assertion failed at file:%s line: %d\n",
|
_alert("Assertion failed at file:%s line: %d\n",
|
||||||
filename, linenum);
|
filename, linenum);
|
||||||
|
Loading…
Reference in New Issue
Block a user