summaryrefslogtreecommitdiffstats
path: root/cddl/lib/libdtrace/libproc_compat.h
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2014-10-03 23:20:37 +0000
committermarkj <markj@FreeBSD.org>2014-10-03 23:20:37 +0000
commit91d5d12d67db05be29b36096bcb90e39e1541fae (patch)
treee5d14bcbe841b9c2e8e073a1970aa1c856236b02 /cddl/lib/libdtrace/libproc_compat.h
parentb089d064397fe71608574f13f2e413d9e5c2786a (diff)
downloadFreeBSD-src-91d5d12d67db05be29b36096bcb90e39e1541fae.zip
FreeBSD-src-91d5d12d67db05be29b36096bcb90e39e1541fae.tar.gz
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
Diffstat (limited to 'cddl/lib/libdtrace/libproc_compat.h')
-rw-r--r--cddl/lib/libdtrace/libproc_compat.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/cddl/lib/libdtrace/libproc_compat.h b/cddl/lib/libdtrace/libproc_compat.h
index 8443336..0d99d96 100644
--- a/cddl/lib/libdtrace/libproc_compat.h
+++ b/cddl/lib/libdtrace/libproc_compat.h
@@ -38,7 +38,7 @@
#define Pxlookup_by_addr(p, a, n, s, sym, i) \
proc_addr2sym(p, a, n, s, sym)
#define Pxlookup_by_name(p, l, s1, s2, sym, a) \
- proc_name2sym((p), (s1), (s2), (sym))
+ proc_name2sym(p, s1, s2, sym, a)
#define Paddr_to_map proc_addr2map
#define Pcreate_error strerror
#define Pdelbkpt proc_bkptdel
@@ -46,10 +46,10 @@
#define Plmid(p, a, l) (-1)
#define Plmid_to_map(p, l, o) proc_obj2map((p), (o))
#define Plookup_by_addr proc_addr2sym
-#define Pname_to_ctf(p, obj) NULL
+#define Pname_to_ctf(p, obj) (ctf_file_t *)proc_name2ctf(p, obj)
#define Pname_to_map proc_name2map
#define Pobject_iter proc_iter_objs
-#define Pobject_iter_resolved(p, f, arg) 1
+#define Pobject_iter_resolved(p, f, arg) proc_iter_objs(p, f, arg)
#define Pobjname proc_objname
#define Pread proc_read
#define Prd_agent proc_rdagent
OpenPOWER on IntegriCloud