1178479Sjb/*
2178479Sjb * CDDL HEADER START
3178479Sjb *
4178479Sjb * The contents of this file are subject to the terms of the
5178479Sjb * Common Development and Distribution License, Version 1.0 only
6178479Sjb * (the "License").  You may not use this file except in compliance
7178479Sjb * with the License.
8178479Sjb *
9178479Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10178479Sjb * or http://www.opensolaris.org/os/licensing.
11178479Sjb * See the License for the specific language governing permissions
12178479Sjb * and limitations under the License.
13178479Sjb *
14178479Sjb * When distributing Covered Code, include this CDDL HEADER in each
15178479Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16178479Sjb * If applicable, add the following below this CDDL HEADER, with the
17178479Sjb * fields enclosed by brackets "[]" replaced with your own identifying
18178479Sjb * information: Portions Copyright [yyyy] [name of copyright owner]
19178479Sjb *
20178479Sjb * CDDL HEADER END
21178479Sjb */
22178479Sjb
23178479Sjb/*
24178479Sjb * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25178479Sjb * Use is subject to license terms.
26178479Sjb */
27268578Srpaulo/*
28268578Srpaulo * Copyright (c) 2013, Joyent, Inc.  All rights reserved.
29268578Srpaulo */
30178479Sjb
31178479Sjb#ifndef	_DT_PID_H
32178479Sjb#define	_DT_PID_H
33178479Sjb
34178479Sjb#include <libproc.h>
35178479Sjb#include <sys/fasttrap.h>
36178479Sjb#include <dt_impl.h>
37178479Sjb
38178479Sjb#ifdef	__cplusplus
39178479Sjbextern "C" {
40178479Sjb#endif
41178479Sjb
42178479Sjb#define	DT_PROC_ERR	(-1)
43178479Sjb#define	DT_PROC_ALIGN	(-2)
44178479Sjb
45178479Sjbextern int dt_pid_create_probes(dtrace_probedesc_t *, dtrace_hdl_t *,
46178479Sjb    dt_pcb_t *pcb);
47178479Sjbextern int dt_pid_create_probes_module(dtrace_hdl_t *, dt_proc_t *);
48178479Sjb
49178479Sjbextern int dt_pid_create_entry_probe(struct ps_prochandle *, dtrace_hdl_t *,
50178479Sjb    fasttrap_probe_spec_t *, const GElf_Sym *);
51178479Sjb
52178479Sjbextern int dt_pid_create_return_probe(struct ps_prochandle *, dtrace_hdl_t *,
53178479Sjb    fasttrap_probe_spec_t *, const GElf_Sym *, uint64_t *);
54178479Sjb
55178479Sjbextern int dt_pid_create_offset_probe(struct ps_prochandle *, dtrace_hdl_t *,
56178479Sjb    fasttrap_probe_spec_t *, const GElf_Sym *, ulong_t);
57178479Sjb
58178479Sjbextern int dt_pid_create_glob_offset_probes(struct ps_prochandle *,
59178479Sjb    dtrace_hdl_t *, fasttrap_probe_spec_t *, const GElf_Sym *, const char *);
60178479Sjb
61268578Srpauloextern void dt_pid_get_types(dtrace_hdl_t *, const dtrace_probedesc_t *,
62268578Srpaulo    dtrace_argdesc_t *, int *);
63268578Srpaulo
64178479Sjb#ifdef	__cplusplus
65178479Sjb}
66178479Sjb#endif
67178479Sjb
68178479Sjb#endif	/* _DT_PID_H */
69