sched/modules: Be consistent use of binary loader debug instrumentation. Was mixed system and binary loader debug. libs/libc/modlib: Switch from systemb to binary load debug to be consistent with sched/modules.

This commit is contained in:
Gregory Nutt
2018-06-01 10:10:17 -06:00
parent 12de93dd36
commit a6a88198c0
13 changed files with 68 additions and 68 deletions
+10 -10
View File
@@ -86,7 +86,7 @@ static inline int modlib_sectname(FAR struct mod_loadinfo_s *loadinfo,
shstrndx = loadinfo->ehdr.e_shstrndx;
if (shstrndx == SHN_UNDEF)
{
serr("ERROR: No section header string table\n");
berr("ERROR: No section header string table\n");
return -EINVAL;
}
@@ -119,7 +119,7 @@ static inline int modlib_sectname(FAR struct mod_loadinfo_s *loadinfo,
{
if (loadinfo->filelen <= offset)
{
serr("ERROR: At end of file\n");
berr("ERROR: At end of file\n");
return -EINVAL;
}
@@ -132,7 +132,7 @@ static inline int modlib_sectname(FAR struct mod_loadinfo_s *loadinfo,
ret = modlib_read(loadinfo, buffer, readlen, offset);
if (ret < 0)
{
serr("ERROR: Failed to read section name: %d\n", ret);
berr("ERROR: Failed to read section name: %d\n", ret);
return ret;
}
@@ -152,7 +152,7 @@ static inline int modlib_sectname(FAR struct mod_loadinfo_s *loadinfo,
ret = modlib_reallocbuffer(loadinfo, CONFIG_MODLIB_BUFFERINCR);
if (ret < 0)
{
serr("ERROR: mod_reallocbuffer failed: %d\n", ret);
berr("ERROR: mod_reallocbuffer failed: %d\n", ret);
return ret;
}
}
@@ -189,7 +189,7 @@ int modlib_loadshdrs(FAR struct mod_loadinfo_s *loadinfo)
if (loadinfo->ehdr.e_shnum < 1)
{
serr("ERROR: No sections(?)\n");
berr("ERROR: No sections(?)\n");
return -EINVAL;
}
@@ -198,7 +198,7 @@ int modlib_loadshdrs(FAR struct mod_loadinfo_s *loadinfo)
shdrsize = (size_t)loadinfo->ehdr.e_shentsize * (size_t)loadinfo->ehdr.e_shnum;
if (loadinfo->ehdr.e_shoff + shdrsize > loadinfo->filelen)
{
serr("ERROR: Insufficent space in file for section header table\n");
berr("ERROR: Insufficent space in file for section header table\n");
return -ESPIPE;
}
@@ -207,7 +207,7 @@ int modlib_loadshdrs(FAR struct mod_loadinfo_s *loadinfo)
loadinfo->shdr = (FAR FAR Elf32_Shdr *)lib_malloc(shdrsize);
if (!loadinfo->shdr)
{
serr("ERROR: Failed to allocate the section header table. Size: %ld\n",
berr("ERROR: Failed to allocate the section header table. Size: %ld\n",
(long)shdrsize);
return -ENOMEM;
}
@@ -218,7 +218,7 @@ int modlib_loadshdrs(FAR struct mod_loadinfo_s *loadinfo)
loadinfo->ehdr.e_shoff);
if (ret < 0)
{
serr("ERROR: Failed to read section header table: %d\n", ret);
berr("ERROR: Failed to read section header table: %d\n", ret);
}
return ret;
@@ -258,13 +258,13 @@ int modlib_findsection(FAR struct mod_loadinfo_s *loadinfo,
ret = modlib_sectname(loadinfo, shdr);
if (ret < 0)
{
serr("ERROR: modlib_sectname failed: %d\n", ret);
berr("ERROR: modlib_sectname failed: %d\n", ret);
return ret;
}
/* Check if the name of this section is 'sectname' */
sinfo("%d. Comparing \"%s\" and .\"%s\"\n",
binfo("%d. Comparing \"%s\" and .\"%s\"\n",
i, loadinfo->iobuffer, sectname);
if (strcmp((FAR const char *)loadinfo->iobuffer, sectname) == 0)