summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2014-05-08 03:43:18 +0000
committermarkj <markj@FreeBSD.org>2014-05-08 03:43:18 +0000
commitb2936ab3df6fac9d0c863866eb4ec0dc54f95f19 (patch)
treec0131232f4512adf21d9413e6ef41d9f9e0824e4
parentad9151c24fb1c305bcd9c90dfa9be5888144012b (diff)
downloadFreeBSD-src-b2936ab3df6fac9d0c863866eb4ec0dc54f95f19.zip
FreeBSD-src-b2936ab3df6fac9d0c863866eb4ec0dc54f95f19.tar.gz
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
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c2
1 files changed, 1 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud