Date: Wed, 19 Apr 2006 20:14:42 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95622 for review Message-ID: <200604192014.k3JKEgQO006184@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95622 Change 95622 by jb@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604192014.k3JKEgQO006184>