path: root/cddl
diff options
authorMark Johnston <markj@FreeBSD.org>2016-12-06 04:20:32 +0000
committerMark Johnston <markj@FreeBSD.org>2016-12-06 04:20:32 +0000
commitd42df2a44793413692a006e46faad87ec7b9e34f (patch)
treebdea9504a1c76f02abf7bfe4afa19d8c47dddf8a /cddl
parent07a9c2e65d5f2f21cc9783e33dd94a5ce8cc592d (diff)
libproc: Match prefixes when looking up mapped object by name.
When looking up an object by name, allow prefix matches if no direct match is found. This allows one to, for example, match libc entry probes with: # dtrace -n 'pid$target:libc.so::entry' -c ./foo instead of requiring "libc.so.7" or a glob. Also remove proc_obj2map() as it currently just duplicates the functionality of proc_name2map(). It's supposed to take a Solaris link-map ID as a paramter, but support for this isn't implemented and isn't required to support DTrace's pid provider.
Notes: svn path=/head/; revision=309595
Diffstat (limited to 'cddl')
1 files changed, 1 insertions, 1 deletions
diff --git a/cddl/lib/libdtrace/libproc_compat.h b/cddl/lib/libdtrace/libproc_compat.h
index 8704b820df58..0bb9e05424b7 100644
--- a/cddl/lib/libdtrace/libproc_compat.h
+++ b/cddl/lib/libdtrace/libproc_compat.h
@@ -44,7 +44,7 @@
#define Pdelbkpt proc_bkptdel
#define Pgrab_error strerror
#define Plmid(p, a, l) (-1)
-#define Plmid_to_map(p, l, o) proc_obj2map((p), (o))
+#define Plmid_to_map(p, l, o) proc_name2map(p, o)
#define Plookup_by_addr proc_addr2sym
#define Pname_to_ctf(p, obj) (ctf_file_t *)proc_name2ctf(p, obj)
#define Pname_to_map proc_name2map