xref: /netbsd-src/external/cddl/osnet/dist/lib/libdtrace/common/dt_pid.h (revision c0855460da148f19acba9384f3b92685f0354376)
1a864dc36Sdarran /*
2a864dc36Sdarran  * CDDL HEADER START
3a864dc36Sdarran  *
4a864dc36Sdarran  * The contents of this file are subject to the terms of the
5a864dc36Sdarran  * Common Development and Distribution License, Version 1.0 only
6a864dc36Sdarran  * (the "License").  You may not use this file except in compliance
7a864dc36Sdarran  * with the License.
8a864dc36Sdarran  *
9a864dc36Sdarran  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10a864dc36Sdarran  * or http://www.opensolaris.org/os/licensing.
11a864dc36Sdarran  * See the License for the specific language governing permissions
12a864dc36Sdarran  * and limitations under the License.
13a864dc36Sdarran  *
14a864dc36Sdarran  * When distributing Covered Code, include this CDDL HEADER in each
15a864dc36Sdarran  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16a864dc36Sdarran  * If applicable, add the following below this CDDL HEADER, with the
17a864dc36Sdarran  * fields enclosed by brackets "[]" replaced with your own identifying
18a864dc36Sdarran  * information: Portions Copyright [yyyy] [name of copyright owner]
19a864dc36Sdarran  *
20a864dc36Sdarran  * CDDL HEADER END
21a864dc36Sdarran  */
22a864dc36Sdarran 
23a864dc36Sdarran /*
24a864dc36Sdarran  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25a864dc36Sdarran  * Use is subject to license terms.
26a864dc36Sdarran  */
27*c0855460Schristos /*
28*c0855460Schristos  * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
29*c0855460Schristos  */
30a864dc36Sdarran 
31a864dc36Sdarran #ifndef	_DT_PID_H
32a864dc36Sdarran #define	_DT_PID_H
33a864dc36Sdarran 
34a864dc36Sdarran #include <libproc.h>
35a864dc36Sdarran #include <sys/fasttrap.h>
36a864dc36Sdarran #include <dt_impl.h>
37a864dc36Sdarran 
38a864dc36Sdarran #ifdef	__cplusplus
39a864dc36Sdarran extern "C" {
40a864dc36Sdarran #endif
41a864dc36Sdarran 
42a864dc36Sdarran #define	DT_PROC_ERR	(-1)
43a864dc36Sdarran #define	DT_PROC_ALIGN	(-2)
44a864dc36Sdarran 
45a864dc36Sdarran extern int dt_pid_create_probes(dtrace_probedesc_t *, dtrace_hdl_t *,
46a864dc36Sdarran     dt_pcb_t *pcb);
47a864dc36Sdarran extern int dt_pid_create_probes_module(dtrace_hdl_t *, dt_proc_t *);
48a864dc36Sdarran 
49a864dc36Sdarran extern int dt_pid_create_entry_probe(struct ps_prochandle *, dtrace_hdl_t *,
50a864dc36Sdarran     fasttrap_probe_spec_t *, const GElf_Sym *);
51a864dc36Sdarran 
52a864dc36Sdarran extern int dt_pid_create_return_probe(struct ps_prochandle *, dtrace_hdl_t *,
53a864dc36Sdarran     fasttrap_probe_spec_t *, const GElf_Sym *, uint64_t *);
54a864dc36Sdarran 
55a864dc36Sdarran extern int dt_pid_create_offset_probe(struct ps_prochandle *, dtrace_hdl_t *,
56a864dc36Sdarran     fasttrap_probe_spec_t *, const GElf_Sym *, ulong_t);
57a864dc36Sdarran 
58a864dc36Sdarran extern int dt_pid_create_glob_offset_probes(struct ps_prochandle *,
59a864dc36Sdarran     dtrace_hdl_t *, fasttrap_probe_spec_t *, const GElf_Sym *, const char *);
60a864dc36Sdarran 
61*c0855460Schristos extern void dt_pid_get_types(dtrace_hdl_t *, const dtrace_probedesc_t *,
62*c0855460Schristos     dtrace_argdesc_t *, int *);
63*c0855460Schristos 
64a864dc36Sdarran #ifdef	__cplusplus
65a864dc36Sdarran }
66a864dc36Sdarran #endif
67a864dc36Sdarran 
68a864dc36Sdarran #endif	/* _DT_PID_H */
69