HomeFreeBSD

libproc: Match prefixes when looking up mapped object by name.

Description

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:

  1. 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.

Details

Provenance
markjAuthored on
Parents
rS309594: libproc: Cache ELF handles for loaded objects.
Branches
Unknown
Tags
Unknown