Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Oct 2017 16:23:45 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325042 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Message-ID:  <201710271623.v9RGNjec047721@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri Oct 27 16:23:45 2017
New Revision: 325042
URL: https://svnweb.freebsd.org/changeset/base/325042

Log:
  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

Modified:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c	Fri Oct 27 15:33:26 2017	(r325041)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c	Fri Oct 27 16:23:45 2017	(r325042)
@@ -229,10 +229,12 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof,
 		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__,__L
 			    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__,__L
 			    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)

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c	Fri Oct 27 15:33:26 2017	(r325041)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c	Fri Oct 27 16:23:45 2017	(r325042)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710271623.v9RGNjec047721>