summaryrefslogtreecommitdiffstats
path: root/lib/libproc/libproc.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 /lib/libproc/libproc.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 'lib/libproc/libproc.h')
-rw-r--r--lib/libproc/libproc.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libproc/libproc.h b/lib/libproc/libproc.h
index be77e4b..5d81c2b 100644
--- a/lib/libproc/libproc.h
+++ b/lib/libproc/libproc.h
@@ -37,6 +37,7 @@
#include <rtld_db.h>
#include <limits.h>
+struct ctf_file;
struct proc_handle;
typedef void (*proc_child_func)(void *);
@@ -67,6 +68,11 @@ typedef struct prmap {
#define MA_NOCOREDUMP 0x20
} prmap_t;
+typedef struct prsyminfo {
+ u_int prs_lmid; /* Map id. */
+ u_int prs_id; /* Symbol id. */
+} prsyminfo_t;
+
typedef int proc_map_f(void *, const prmap_t *, const char *);
typedef int proc_sym_f(void *, const GElf_Sym *, const char *);
@@ -125,7 +131,9 @@ int proc_create(const char *, char * const *, proc_child_func *, void *,
struct proc_handle **);
int proc_detach(struct proc_handle *, int);
int proc_getflags(struct proc_handle *);
-int proc_name2sym(struct proc_handle *, const char *, const char *, GElf_Sym *);
+int proc_name2sym(struct proc_handle *, const char *, const char *,
+ GElf_Sym *, prsyminfo_t *);
+struct ctf_file *proc_name2ctf(struct proc_handle *, const char *);
int proc_setflags(struct proc_handle *, int);
int proc_state(struct proc_handle *);
pid_t proc_getpid(struct proc_handle *);
@@ -133,8 +141,7 @@ int proc_wstatus(struct proc_handle *);
int proc_getwstat(struct proc_handle *);
char * proc_signame(int, char *, size_t);
int proc_read(struct proc_handle *, void *, size_t, size_t);
-const lwpstatus_t *
- proc_getlwpstatus(struct proc_handle *);
+const lwpstatus_t *proc_getlwpstatus(struct proc_handle *);
void proc_free(struct proc_handle *);
rd_agent_t *proc_rdagent(struct proc_handle *);
void proc_updatesyms(struct proc_handle *);
OpenPOWER on IntegriCloud