Userland CTF support was recently implemented upstream but has been disabled in FreeBSD because it requires a bit of work in libproc. This change makes the needed modifications. Specifically,
- uncomment some libdtrace code which does lookups of functions and type names in an objects CTF
- introduce a libproc function to obtain ctf data out of an object (proc_name2ctf()). This function requires libctf and just returns NULL if libproc is compiled without libctf (WITHOUT_CDDL).
- proc_name2sym now returns a prsyminfo_t, which is an upstream type that just serves as an identifier for symbols. Upstream libproc uses it more extensively than we do, I just implemented the minimum support needed for CTF.
There's some more work to do here, especially in the ctf* tools. It's looking like a lot of CTF info is missing when I compile world with WITH_CTF=YES. The upside is that we can now use args[n] in userland probes (again assuming that the CTF info is there), and reference userland types and so on.
It's also worth noting that libproc is fairly inefficient, since it doesn't do much caching of symbol or map info. I'll be working on that in the future, but I wanted to get userland CTF mostly working with a minimal change first.