]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libproc: Match prefixes when looking up mapped object by name.
authormarkj <markj@FreeBSD.org>
Tue, 6 Dec 2016 04:20:32 +0000 (04:20 +0000)
committermarkj <markj@FreeBSD.org>
Tue, 6 Dec 2016 04:20:32 +0000 (04:20 +0000)
commit5d79d7739333e09184e3644b7b61c2e289edbd45
treebdea9504a1c76f02abf7bfe4afa19d8c47dddf8a
parente039d5c9e3f147a42b99d1365f3c557e274469a0
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.
cddl/lib/libdtrace/libproc_compat.h
lib/libproc/libproc.h
lib/libproc/proc_sym.c
lib/libproc/tests/proc_test.c