Add more command to msh for module.

This commit is contained in:
bernard 2014-03-12 08:47:10 +08:00
parent 09bb7393b2
commit 444b928d22
1 changed files with 17 additions and 13 deletions

View File

@ -516,8 +516,8 @@ int list_module(void)
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)
{
@ -605,20 +605,24 @@ int list_mod_detail(const char *name)
if (!rt_list_isempty(tlist)) _list_timer(tlist);
}
rt_kprintf("symbol address \n");
rt_kprintf("-------- ----------\n");
if (module->nsym > 0)
{
rt_kprintf("symbol address \n");
rt_kprintf("-------- ----------\n");
/* list module export symbols */
for (i=0; i<module->nsym; i++)
{
rt_kprintf("%s 0x%x\n",
module->symtab[i].name, module->symtab[i].addr);
}
/* list module export symbols */
for (i=0; i<module->nsym; i++)
{
rt_kprintf("%s 0x%x\n",
module->symtab[i].name, module->symtab[i].addr);
}
}
}
return 0;
}
FINSH_FUNCTION_EXPORT(list_mod_detail, list module objects in system)
MSH_CMD_EXPORT(list_mod_detail, list module objects in system)
#endif
long list(void)