Add more command to msh for module.
This commit is contained in:
parent
09bb7393b2
commit
444b928d22
|
@ -516,8 +516,8 @@ int list_module(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
FINSH_FUNCTION_EXPORT(list_module, list module in system);
|
||||||
FINSH_FUNCTION_EXPORT(list_module, list module in system)
|
MSH_CMD_EXPORT(list_module, list module in system);
|
||||||
|
|
||||||
int list_mod_detail(const char *name)
|
int list_mod_detail(const char *name)
|
||||||
{
|
{
|
||||||
|
@ -536,7 +536,7 @@ int list_mod_detail(const char *name)
|
||||||
|
|
||||||
/* list main thread in module */
|
/* list main thread in module */
|
||||||
if (module->module_thread != RT_NULL)
|
if (module->module_thread != RT_NULL)
|
||||||
{
|
{
|
||||||
rt_kprintf("main thread pri status sp stack size max used left tick error\n");
|
rt_kprintf("main thread pri status sp stack size max used left tick error\n");
|
||||||
rt_kprintf("------------- ---- ------- ---------- ---------- ---------- ---------- ---\n");
|
rt_kprintf("------------- ---- ------- ---------- ---------- ---------- ---------- ---\n");
|
||||||
thread = module->module_thread;
|
thread = module->module_thread;
|
||||||
|
@ -555,7 +555,7 @@ int list_mod_detail(const char *name)
|
||||||
thread->stack_size - ((rt_uint32_t) ptr - (rt_uint32_t)thread->stack_addr),
|
thread->stack_size - ((rt_uint32_t) ptr - (rt_uint32_t)thread->stack_addr),
|
||||||
thread->remaining_tick,
|
thread->remaining_tick,
|
||||||
thread->error);
|
thread->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* list sub thread in module */
|
/* list sub thread in module */
|
||||||
tlist = &module->module_object[RT_Object_Class_Thread].object_list;
|
tlist = &module->module_object[RT_Object_Class_Thread].object_list;
|
||||||
|
@ -605,20 +605,24 @@ int list_mod_detail(const char *name)
|
||||||
if (!rt_list_isempty(tlist)) _list_timer(tlist);
|
if (!rt_list_isempty(tlist)) _list_timer(tlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
rt_kprintf("symbol address \n");
|
if (module->nsym > 0)
|
||||||
rt_kprintf("-------- ----------\n");
|
{
|
||||||
|
rt_kprintf("symbol address \n");
|
||||||
/* list module export symbols */
|
rt_kprintf("-------- ----------\n");
|
||||||
for (i=0; i<module->nsym; i++)
|
|
||||||
{
|
/* list module export symbols */
|
||||||
rt_kprintf("%s 0x%x\n",
|
for (i=0; i<module->nsym; i++)
|
||||||
module->symtab[i].name, module->symtab[i].addr);
|
{
|
||||||
}
|
rt_kprintf("%s 0x%x\n",
|
||||||
|
module->symtab[i].name, module->symtab[i].addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
FINSH_FUNCTION_EXPORT(list_mod_detail, list module objects in system)
|
FINSH_FUNCTION_EXPORT(list_mod_detail, list module objects in system)
|
||||||
|
MSH_CMD_EXPORT(list_mod_detail, list module objects in system)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
long list(void)
|
long list(void)
|
||||||
|
|
Loading…
Reference in New Issue