libdtrace: replace "DOODAD" with more descriptive string

Previously some unimplemented libdtrace routines printed the function,
file and line number, followed by "DOODAD." That is not particularly
informative, so replace it with a message reporting the actual issue.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
emaste 2017-10-27 16:23:45 +00:00
parent 0c9db49957
commit b280b57c85
2 changed files with 18 additions and 9 deletions

View File

@ -229,10 +229,12 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, dof_elf32_t *dep)
for (j = 0; j < nrel; j++) {
#if defined(__aarch64__)
/* XXX */
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): aarch64 not implemented\n",
__FUNCTION__, __FILE__, __LINE__);
#elif defined(__arm__)
/* XXX */
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): arm not implemented\n",
__FUNCTION__, __FILE__, __LINE__);
#elif defined(__i386) || defined(__amd64)
rel->r_offset = s->dofs_offset +
dofr[j].dofr_offset;
@ -240,7 +242,8 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
R_386_PC32);
#elif defined(__mips__)
/* XXX */
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): MIPS not implemented\n",
__FUNCTION__, __FILE__, __LINE__);
#elif defined(__powerpc__)
/*
* Add 4 bytes to hit the low half of this 64-bit
@ -252,7 +255,8 @@ printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
R_PPC_REL32);
#elif defined(__riscv)
/* XXX */
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): RISC-V not implemented\n",
__FUNCTION__, __FILE__, __LINE__);
#else
#error unknown ISA
#endif
@ -802,7 +806,8 @@ static int
dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
uint32_t *off)
{
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): aarch64 not implemented\n", __FUNCTION__, __FILE__,
__LINE__);
return (0);
}
#elif defined(__arm__)
@ -811,7 +816,8 @@ static int
dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
uint32_t *off)
{
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): arm not implemented\n", __FUNCTION__, __FILE__,
__LINE__);
return (0);
}
#elif defined(__mips__)
@ -820,7 +826,8 @@ static int
dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
uint32_t *off)
{
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): MIPS not implemented\n", __FUNCTION__, __FILE__,
__LINE__);
return (0);
}
#elif defined(__powerpc__)
@ -910,7 +917,8 @@ static int
dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
uint32_t *off)
{
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): RISC-V implementation required\n", __FUNCTION__,
__FILE__, __LINE__);
return (0);
}
#elif defined(__sparc)

View File

@ -426,7 +426,8 @@ dt_proc_attach(dt_proc_t *dpr, int exec)
static void
dt_proc_waitrun(dt_proc_t *dpr)
{
printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__);
printf("%s:%s(%d): not implemented\n", __FUNCTION__, __FILE__,
__LINE__);
#ifdef DOODAD
struct ps_prochandle *P = dpr->dpr_proc;
const lwpstatus_t *psp = &Pstatus(P)->pr_lwp;