PERFORCE change 95622 for review
John Birrell
jb at FreeBSD.org
Wed Apr 19 20:14:43 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=95622
Change 95622 by jb at jb_freebsd2 on 2006/04/19 20:14:39
Enable _dtrace_init() as a constructor. This is the most convenient way
to turn on debug in dtrace(1). Another way is via the '-x debug' command
like argument, but quite a lot of initialisation takes place before
options like that are processed.
Affected files ...
.. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#6 edit
Differences ...
==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#6 (text) ====
@@ -640,17 +640,21 @@
#if defined(sun)
#pragma init(_dtrace_init)
+#else
+void _dtrace_init(void) __attribute__ ((constructor));
+#endif
void
_dtrace_init(void)
{
_dtrace_debug = getenv("DTRACE_DEBUG") != NULL;
+#if defined(sun)
for (; _dtrace_rdvers > 0; _dtrace_rdvers--) {
if (rd_init(_dtrace_rdvers) == RD_OK)
break;
}
+#endif
}
-#endif
static dtrace_hdl_t *
set_open_errno(dtrace_hdl_t *dtp, int *errp, int err)
More information about the p4-projects
mailing list