Commit Graph

4 Commits

Author SHA1 Message Date
Mark Johnston
a7e13d50fe librtld_db: Use the auxv to figure out where to look up loader symbols.
Previously, librtld_db just hardcoded /libexec/ld-elf.so, which isn't
correct for processes that aren't using the native ABI. With this change,
librtld_db can be used to inspect non-native processes; in particular,
dtrace -c now works for 32-bit executables on amd64.

MFC after:	1 month
2016-07-30 03:05:23 +00:00
Mark Johnston
41da933c87 Hook up support for userland CTF support in DTrace. This required some
modifications to libproc to support fetching the CTF info for a given file.

With this change, dtrace(1) is able to resolve type info for function and
USDT probe arguments, and function return values. In particular, the args[n]
syntax should now work for referencing arguments of userland probes,
provided that the requisite CTF info is available.

The uctf tests pass if the test programs are compiled with CTF info. The
current infrastructure around the DTrace test suite doesn't support this
yet.

Differential Revision:	https://reviews.freebsd.org/D891
MFC after:		1 month
Relnotes:		yes
Sponsored by:		EMC / Isilon Storage Division
2014-10-03 23:20:37 +00:00
Mark Johnston
b252f278ea Handle the different event types properly in rd_event_addr(). In particular,
with r265456 _r_debug_postinit can be used for RD_POSTINIT events. rtld(1)
uses r_debug_state for dl state transitions, so we use its address for
RD_DLACTIVITY events.

MFC after:	2 weeks
2014-05-08 03:26:25 +00:00
Rui Paulo
cb31498865 Import the librtld_db library. This is needed by userland DTrace.
This is not yet enabled in the build because I also need to import a new
version of libproc.

Sponsored by:	The FreeBSD Foundation
2010-07-31 14:26:10 +00:00