Replace all occurrences of vdbg with vinfo

This commit is contained in:
Gregory Nutt
2016-06-11 11:59:51 -06:00
parent 3a74a438d9
commit fc3540cffe
845 changed files with 5817 additions and 5817 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ int binfmt_copyargv(FAR struct binary_s *bin, FAR char * const *argv)
}
}
bvdbg("args=%d argsize=%lu\n", nargs, (unsigned long)argsize);
binfo("args=%d argsize=%lu\n", nargs, (unsigned long)argsize);
/* Allocate the argv array and an argument buffer */
+2 -2
View File
@@ -109,7 +109,7 @@ static void exec_ctors(FAR void *arg)
for (i = 0; i < binp->nctors; i++)
{
bvdbg("Calling ctor %d at %p\n", i, (FAR void *)ctor);
binfo("Calling ctor %d at %p\n", i, (FAR void *)ctor);
(*ctor)();
ctor++;
@@ -155,7 +155,7 @@ int exec_module(FAR const struct binary_s *binp)
}
#endif
bvdbg("Executing %s\n", binp->filename);
binfo("Executing %s\n", binp->filename);
/* Allocate a TCB for the new task. */
+2 -2
View File
@@ -120,7 +120,7 @@ static int load_absmodule(FAR struct binary_s *bin)
FAR struct binfmt_s *binfmt;
int ret = -ENOENT;
bvdbg("Loading %s\n", bin->filename);
binfo("Loading %s\n", bin->filename);
/* Disabling pre-emption should be sufficient protection while accessing
* the list of registered binary format handlers.
@@ -142,7 +142,7 @@ static int load_absmodule(FAR struct binary_s *bin)
{
/* Successfully loaded -- break out with ret == 0 */
bvdbg("Successfully loaded module %s\n", bin->filename);
binfo("Successfully loaded module %s\n", bin->filename);
/* Save the unload method for use by unload_module */
+2 -2
View File
@@ -284,7 +284,7 @@ int schedule_unload(pid_t pid, FAR struct binary_s *bin)
/* The errno value will get trashed by the following debug output */
errorcode = get_errno();
bvdbg("ERROR: sigprocmask failed: %d\n", ret);
binfo("ERROR: sigprocmask failed: %d\n", ret);
goto errout;
}
@@ -310,7 +310,7 @@ int schedule_unload(pid_t pid, FAR struct binary_s *bin)
/* The errno value will get trashed by the following debug output */
errorcode = get_errno();
bvdbg("ERROR: sigaction failed: %d\n" , ret);
binfo("ERROR: sigaction failed: %d\n" , ret);
/* Emergency removal from the list */
+3 -3
View File
@@ -108,7 +108,7 @@ static inline int exec_dtors(FAR struct binary_s *binp)
for (i = 0; i < binp->ndtors; i++)
{
bvdbg("Calling dtor %d at %p\n", i, (FAR void *)dtor);
binfo("Calling dtor %d at %p\n", i, (FAR void *)dtor);
(*dtor)();
dtor++;
@@ -187,7 +187,7 @@ int unload_module(FAR struct binary_s *binp)
if (binp->mapped)
{
bvdbg("Unmapping address space: %p\n", binp->mapped);
binfo("Unmapping address space: %p\n", binp->mapped);
munmap(binp->mapped, binp->mapsize);
}
@@ -198,7 +198,7 @@ int unload_module(FAR struct binary_s *binp)
{
if (binp->alloc[i])
{
bvdbg("Freeing alloc[%d]: %p\n", i, binp->alloc[i]);
binfo("Freeing alloc[%d]: %p\n", i, binp->alloc[i]);
kumm_free((FAR void *)binp->alloc[i]);
}
}
+2 -2
View File
@@ -95,7 +95,7 @@ static int builtin_loadbinary(struct binary_s *binp)
int index;
int ret;
bvdbg("Loading file: %s\n", binp->filename);
binfo("Loading file: %s\n", binp->filename);
/* Open the binary file for reading (only) */
@@ -171,7 +171,7 @@ int builtin_initialize(void)
/* Register ourselves as a binfmt loader */
bvdbg("Registering Builtin Loader\n");
binfo("Registering Builtin Loader\n");
ret = register_binfmt(&g_builtin_binfmt);
if (ret != 0)
+3 -3
View File
@@ -73,7 +73,7 @@
#endif
#ifdef CONFIG_ELF_DUMPBUFFER
# define elf_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n)
# define elf_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n)
#else
# define elf_dumpbuffer(m,b,n)
#endif
@@ -229,7 +229,7 @@ static int elf_loadbinary(FAR struct binary_s *binp)
struct elf_loadinfo_s loadinfo; /* Contains globals for libelf */
int ret;
bvdbg("Loading file: %s\n", binp->filename);
binfo("Loading file: %s\n", binp->filename);
/* Initialize the ELF library to load the program binary. */
@@ -338,7 +338,7 @@ int elf_initialize(void)
/* Register ourselves as a binfmt loader */
bvdbg("Registering ELF\n");
binfo("Registering ELF\n");
ret = register_binfmt(&g_elfbinfmt);
if (ret != 0)
+1 -1
View File
@@ -68,7 +68,7 @@
#endif
#ifdef CONFIG_ELF_DUMPBUFFER
# define elf_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n)
# define elf_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n)
#else
# define elf_dumpbuffer(m,b,n)
#endif
+3 -3
View File
@@ -121,7 +121,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo)
* static constructor section.
*/
bvdbg("elf_findsection .ctors section failed: %d\n", ctoridx);
binfo("elf_findsection .ctors section failed: %d\n", ctoridx);
return ret == -ENOENT ? OK : ret;
}
@@ -138,7 +138,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo)
ctorsize = shdr->sh_size;
loadinfo->nctors = ctorsize / sizeof(binfmt_ctor_t);
bvdbg("ctoridx=%d ctorsize=%d sizeof(binfmt_ctor_t)=%d nctors=%d\n",
binfo("ctoridx=%d ctorsize=%d sizeof(binfmt_ctor_t)=%d nctors=%d\n",
ctoridx, ctorsize, sizeof(binfmt_ctor_t), loadinfo->nctors);
/* Check if there are any constructors. It is not an error if there
@@ -191,7 +191,7 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo)
{
FAR uintptr_t *ptr = (uintptr_t *)((FAR void *)(&loadinfo->ctors)[i]);
bvdbg("ctor %d: %08lx + %08lx = %08lx\n",
binfo("ctor %d: %08lx + %08lx = %08lx\n",
i, *ptr, (unsigned long)loadinfo->textalloc,
(unsigned long)(*ptr + loadinfo->textalloc));
+3 -3
View File
@@ -121,7 +121,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo)
* static destructor section.
*/
bvdbg("elf_findsection .dtors section failed: %d\n", dtoridx);
binfo("elf_findsection .dtors section failed: %d\n", dtoridx);
return ret == -ENOENT ? OK : ret;
}
@@ -138,7 +138,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo)
dtorsize = shdr->sh_size;
loadinfo->ndtors = dtorsize / sizeof(binfmt_dtor_t);
bvdbg("dtoridx=%d dtorsize=%d sizeof(binfmt_dtor_t)=%d ndtors=%d\n",
binfo("dtoridx=%d dtorsize=%d sizeof(binfmt_dtor_t)=%d ndtors=%d\n",
dtoridx, dtorsize, sizeof(binfmt_dtor_t), loadinfo->ndtors);
/* Check if there are any destructors. It is not an error if there
@@ -191,7 +191,7 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo)
{
FAR uintptr_t *ptr = (uintptr_t *)((FAR void *)(&loadinfo->dtors)[i]);
bvdbg("dtor %d: %08lx + %08lx = %08lx\n",
binfo("dtor %d: %08lx + %08lx = %08lx\n",
i, *ptr, (unsigned long)loadinfo->textalloc,
(unsigned long)(*ptr + loadinfo->textalloc));
+2 -2
View File
@@ -65,7 +65,7 @@
#endif
#ifdef CONFIG_ELF_DUMPBUFFER
# define elf_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n)
# define elf_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n)
#else
# define elf_dumpbuffer(m,b,n)
#endif
@@ -145,7 +145,7 @@ int elf_init(FAR const char *filename, FAR struct elf_loadinfo_s *loadinfo)
{
int ret;
bvdbg("filename: %s loadinfo: %p\n", filename, loadinfo);
binfo("filename: %s loadinfo: %p\n", filename, loadinfo);
/* Clear the load info structure */
+4 -4
View File
@@ -156,7 +156,7 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo)
/* Read each section into memory that is marked SHF_ALLOC + SHT_NOBITS */
bvdbg("Loaded sections:\n");
binfo("Loaded sections:\n");
text = (FAR uint8_t *)loadinfo->textalloc;
data = (FAR uint8_t *)loadinfo->dataalloc;
@@ -212,7 +212,7 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo)
/* Update sh_addr to point to copy in memory */
bvdbg("%d. %08lx->%08lx\n", i,
binfo("%d. %08lx->%08lx\n", i,
(unsigned long)shdr->sh_addr, (unsigned long)*pptr);
shdr->sh_addr = (uintptr_t)*pptr;
@@ -250,7 +250,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo)
#endif
int ret;
bvdbg("loadinfo: %p\n", loadinfo);
binfo("loadinfo: %p\n", loadinfo);
DEBUGASSERT(loadinfo && loadinfo->filfd >= 0);
/* Load section headers into memory */
@@ -335,7 +335,7 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo)
exidx = elf_findsection(loadinfo, CONFIG_ELF_EXIDX_SECTNAME);
if (exidx < 0)
{
bvdbg("elf_findsection: Exception Index section not found: %d\n", exidx);
binfo("elf_findsection: Exception Index section not found: %d\n", exidx);
}
else
{
+1 -1
View File
@@ -115,7 +115,7 @@ int elf_read(FAR struct elf_loadinfo_s *loadinfo, FAR uint8_t *buffer,
ssize_t nbytes; /* Number of bytes read */
off_t rpos; /* Position returned by lseek */
bvdbg("Read %ld bytes from offset %ld\n", (long)readsize, (long)offset);
binfo("Read %ld bytes from offset %ld\n", (long)readsize, (long)offset);
/* Loop until all of the requested data has been read. */
+1 -1
View File
@@ -270,7 +270,7 @@ int elf_findsection(FAR struct elf_loadinfo_s *loadinfo,
/* Check if the name of this section is 'sectname' */
bvdbg("%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)
+3 -3
View File
@@ -286,7 +286,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf32_Sym *sym,
{
/* st_value already holds the correct value */
bvdbg("SHN_ABS: st_value=%08lx\n", (long)sym->st_value);
binfo("SHN_ABS: st_value=%08lx\n", (long)sym->st_value);
return OK;
}
@@ -322,7 +322,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf32_Sym *sym,
/* Yes... add the exported symbol value to the ELF symbol table entry */
bvdbg("SHN_ABS: name=%s %08x+%08x=%08x\n",
binfo("SHN_ABS: name=%s %08x+%08x=%08x\n",
loadinfo->iobuffer, sym->st_value, symbol->sym_value,
sym->st_value + symbol->sym_value);
@@ -334,7 +334,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf32_Sym *sym,
{
secbase = loadinfo->shdr[sym->st_shndx].sh_addr;
bvdbg("Other: %08x+%08x=%08x\n",
binfo("Other: %08x+%08x=%08x\n",
sym->st_value, secbase, sym->st_value + secbase);
sym->st_value += secbase;
+1 -1
View File
@@ -95,7 +95,7 @@ int elf_verifyheader(FAR const Elf32_Ehdr *ehdr)
if (memcmp(ehdr->e_ident, g_elfmagic, EI_MAGIC_SIZE) != 0)
{
bvdbg("Not ELF magic {%02x, %02x, %02x, %02x}\n",
binfo("Not ELF magic {%02x, %02x, %02x, %02x}\n",
ehdr->e_ident[0], ehdr->e_ident[1], ehdr->e_ident[2], ehdr->e_ident[3]);
return -ENOEXEC;
}
+15 -15
View File
@@ -67,7 +67,7 @@
#endif
#ifdef CONFIG_NXFLAT_DUMPBUFFER
# define nxflat_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n)
# define nxflat_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n)
#else
# define nxflat_dumpbuffer(m,b,n)
#endif
@@ -104,15 +104,15 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo,
{
FAR uint32_t *addr;
bvdbg("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p\n",
binfo("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p\n",
offset, loadinfo->ispace + sizeof(struct nxflat_hdr_s));
if (offset < loadinfo->dsize)
{
addr = (FAR uint32_t *)(offset + loadinfo->dspace->region);
bvdbg(" Before: %08x\n", *addr);
binfo(" Before: %08x\n", *addr);
*addr += (uint32_t)(loadinfo->ispace + sizeof(struct nxflat_hdr_s));
bvdbg(" After: %08x\n", *addr);
binfo(" After: %08x\n", *addr);
return OK;
}
else
@@ -143,15 +143,15 @@ static inline int nxflat_bindrel32d(FAR struct nxflat_loadinfo_s *loadinfo,
{
FAR uint32_t *addr;
bvdbg("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n",
binfo("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n",
offset, loadinfo->dspace->region);
if (offset < loadinfo->dsize)
{
addr = (FAR uint32_t *)(offset + loadinfo->dspace->region);
bvdbg(" Before: %08x\n", *addr);
binfo(" Before: %08x\n", *addr);
*addr += (uint32_t)(loadinfo->dspace->region);
bvdbg(" After: %08x\n", *addr);
binfo(" After: %08x\n", *addr);
return OK;
}
else
@@ -185,15 +185,15 @@ static inline int nxflat_bindrel32id(FAR struct nxflat_loadinfo_s *loadinfo,
{
FAR uint32_t *addr;
bvdbg("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n",
binfo("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n",
offset, loadinfo->dspace->region);
if (offset < loadinfo->dsize)
{
addr = (FAR uint32_t *)(offset + loadinfo->dspace->region);
bvdbg(" Before: %08x\n", *addr);
binfo(" Before: %08x\n", *addr);
*addr += ((uint32_t)loadinfo->ispace - (uint32_t)(loadinfo->dspace->region));
bvdbg(" After: %08x\n", *addr);
binfo(" After: %08x\n", *addr);
return OK;
}
else
@@ -237,7 +237,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo)
offset = ntohl(hdr->h_relocstart);
nrelocs = ntohs(hdr->h_reloccount);
bvdbg("offset: %08lx nrelocs: %d\n", (long)offset, nrelocs);
binfo("offset: %08lx nrelocs: %d\n", (long)offset, nrelocs);
/* The value of the relocation list that we get from the header is a
* file offset. We will have to convert this to an offset into the
@@ -251,7 +251,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo)
relocs = (FAR struct nxflat_reloc_s *)
(offset - loadinfo->isize + loadinfo->dspace->region);
bvdbg("isize: %08lx dpsace: %p relocs: %p\n",
binfo("isize: %08lx dpsace: %p relocs: %p\n",
(long)loadinfo->isize, loadinfo->dspace->region, relocs);
/* All relocations are performed within the D-Space allocation. If
@@ -405,7 +405,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
offset = ntohl(hdr->h_importsymbols);
nimports = ntohs(hdr->h_importcount);
bvdbg("Imports offset: %08x nimports: %d\n", offset, nimports);
binfo("Imports offset: %08x nimports: %d\n", offset, nimports);
/* The import[] table resides within the D-Space allocation. If
* CONFIG_ARCH_ADDRENV=y, then that D-Space allocation lies in an address
@@ -450,7 +450,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
for (i = 0; i < nimports; i++)
{
bvdbg("Import[%d] (%08p) offset: %08x func: %08x\n",
binfo("Import[%d] (%08p) offset: %08x func: %08x\n",
i, &imports[i], imports[i].i_funcname, imports[i].i_funcaddress);
/* Get a pointer to the imported symbol name. The name itself
@@ -484,7 +484,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
imports[i].i_funcaddress = (uint32_t)symbol->sym_value;
bvdbg("Bound import[%d] (%08p) to export '%s' (%08x)\n",
binfo("Bound import[%d] (%08p) to export '%s' (%08x)\n",
i, &imports[i], symname, imports[i].i_funcaddress);
}
}
+2 -2
View File
@@ -63,7 +63,7 @@
#endif
#ifdef CONFIG_NXFLAT_DUMPBUFFER
# define nxflat_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n)
# define nxflat_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n)
#else
# define nxflat_dumpbuffer(m,b,n)
#endif
@@ -100,7 +100,7 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo)
uint32_t bssend;
int ret;
bvdbg("filename: %s loadinfo: %p\n", filename, loadinfo);
binfo("filename: %s loadinfo: %p\n", filename, loadinfo);
/* Clear the load info structure */
+3 -3
View File
@@ -154,7 +154,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
return -errno;
}
bvdbg("Mapped ISpace (%d bytes) at %08x\n", loadinfo->isize, loadinfo->ispace);
binfo("Mapped ISpace (%d bytes) at %08x\n", loadinfo->isize, loadinfo->ispace);
/* The following call allocate D-Space memory and will provide a pointer
* to the allocated (but still uninitialized) D-Space memory.
@@ -167,7 +167,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
return ret;
}
bvdbg("Allocated DSpace (%d bytes) at %p\n",
binfo("Allocated DSpace (%d bytes) at %p\n",
loadinfo->dsize, loadinfo->dspace->region);
/* If CONFIG_ARCH_ADDRENV=y, then the D-Space allocation lies in an address
@@ -197,7 +197,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
goto errout;
}
bvdbg("TEXT: %08x Entry point offset: %08x Data offset: %08x\n",
binfo("TEXT: %08x Entry point offset: %08x Data offset: %08x\n",
loadinfo->ispace, loadinfo->entryoffs, doffset);
/* Restore the original address environment */
+1 -1
View File
@@ -114,7 +114,7 @@ int nxflat_read(struct nxflat_loadinfo_s *loadinfo, char *buffer, int readsize,
int bytesleft; /* Number of bytes of .data left to read */
int bytesread; /* Total number of bytes read */
bvdbg("Read %d bytes from offset %d\n", readsize, offset);
binfo("Read %d bytes from offset %d\n", readsize, offset);
/* Seek to the position in the object file where the initialized
* data is saved.
+3 -3
View File
@@ -65,7 +65,7 @@
#endif
#ifdef CONFIG_NXFLAT_DUMPBUFFER
# define nxflat_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n)
# define nxflat_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n)
#else
# define nxflat_dumpbuffer(m,b,n)
#endif
@@ -151,7 +151,7 @@ static int nxflat_loadbinary(struct binary_s *binp)
struct nxflat_loadinfo_s loadinfo; /* Contains globals for libnxflat */
int ret;
bvdbg("Loading file: %s\n", binp->filename);
binfo("Loading file: %s\n", binp->filename);
/* Initialize the xflat library to load the program binary. */
@@ -252,7 +252,7 @@ int nxflat_initialize(void)
/* Register ourselves as a binfmt loader */
bvdbg("Registering NXFLAT\n");
binfo("Registering NXFLAT\n");
ret = register_binfmt(&g_nxflatbinfmt);
if (ret != 0)
{
+5 -5
View File
@@ -169,7 +169,7 @@ static int pcode_mount_testfs(void)
/* Create a ROM disk for the ROMFS filesystem */
bvdbg("Registering romdisk at /dev/ram%d\n", CONFIG_PCODE_TEST_DEVMINOR);
binfo("Registering romdisk at /dev/ram%d\n", CONFIG_PCODE_TEST_DEVMINOR);
ret = romdisk_register(CONFIG_PCODE_TEST_DEVMINOR, (FAR uint8_t *)romfs_img,
NSECTORS(ROMFS_IMG_LEN), SECTORSIZE);
if (ret < 0)
@@ -180,7 +180,7 @@ static int pcode_mount_testfs(void)
/* Mount the test file system */
bvdbg("Mounting ROMFS filesystem at target=%s with source=%s\n",
binfo("Mounting ROMFS filesystem at target=%s with source=%s\n",
CONFIG_PCODE_TEST_MOUNTPOINT, CONFIG_PCODE_TEST_DEVPATH);
ret = mount(CONFIG_PCODE_TEST_DEVPATH, CONFIG_PCODE_TEST_MOUNTPOINT,
@@ -259,7 +259,7 @@ static int pcode_proxy(int argc, char **argv)
sem_post(&g_pcode_handoff.exclsem);
DEBUGASSERT(binp && fullpath);
bvdbg("Executing %s\n", fullpath);
binfo("Executing %s\n", fullpath);
/* Set-up the on-exit handler that will unload the module on exit */
@@ -310,7 +310,7 @@ static int pcode_load(struct binary_s *binp)
int fd;
int ret;
bvdbg("Loading file: %s\n", binp->filename);
binfo("Loading file: %s\n", binp->filename);
/* Open the binary file for reading (only) */
@@ -479,7 +479,7 @@ int pcode_initialize(void)
/* Register ourselves as a binfmt loader */
bvdbg("Registering P-Code Loader\n");
binfo("Registering P-Code Loader\n");
ret = register_binfmt(&g_pcode_binfmt);
if (ret != 0)