From b2936ab3df6fac9d0c863866eb4ec0dc54f95f19 Mon Sep 17 00:00:00 2001 From: markj Date: Thu, 8 May 2014 03:43:18 +0000 Subject: Re-apply r248644. This fixes an annoying problem which caused dtrace -c to fail to attach to stripped binaries. With the _r_debug_postinit symbol, dtrace(1) can now set a breakpoint in the victim process after it has registered its DOF table(s) with the kernel. r_debug_state cannot be used for this purpose since it is called before DOF is made available, in which case dtrace(1) cannot create USDT probes before the program begins execution. MFC after: 2 weeks --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c') diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c index 767114e..92251d5 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c @@ -1138,7 +1138,7 @@ alloc: #if defined(sun) dtp->dt_prcmode = DT_PROC_STOP_PREINIT; #else - dtp->dt_prcmode = DT_PROC_STOP_MAIN; + dtp->dt_prcmode = DT_PROC_STOP_POSTINIT; #endif dtp->dt_linkmode = DT_LINK_KERNEL; dtp->dt_linktype = DT_LTYP_ELF; -- cgit v1.1