提交 444b928d 编写于 作者: B bernard

Add more command to msh for module.

上级 09bb7393
...@@ -516,8 +516,8 @@ int list_module(void) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册