xref: /netbsd-src/external/cddl/osnet/dist/lib/libdtrace/common/dt_dof.h (revision a864dc36a152ff257761882aea174a236eb36c81)
1*a864dc36Sdarran /*
2*a864dc36Sdarran  * CDDL HEADER START
3*a864dc36Sdarran  *
4*a864dc36Sdarran  * The contents of this file are subject to the terms of the
5*a864dc36Sdarran  * Common Development and Distribution License (the "License").
6*a864dc36Sdarran  * You may not use this file except in compliance with the License.
7*a864dc36Sdarran  *
8*a864dc36Sdarran  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*a864dc36Sdarran  * or http://www.opensolaris.org/os/licensing.
10*a864dc36Sdarran  * See the License for the specific language governing permissions
11*a864dc36Sdarran  * and limitations under the License.
12*a864dc36Sdarran  *
13*a864dc36Sdarran  * When distributing Covered Code, include this CDDL HEADER in each
14*a864dc36Sdarran  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*a864dc36Sdarran  * If applicable, add the following below this CDDL HEADER, with the
16*a864dc36Sdarran  * fields enclosed by brackets "[]" replaced with your own identifying
17*a864dc36Sdarran  * information: Portions Copyright [yyyy] [name of copyright owner]
18*a864dc36Sdarran  *
19*a864dc36Sdarran  * CDDL HEADER END
20*a864dc36Sdarran  */
21*a864dc36Sdarran 
22*a864dc36Sdarran /*
23*a864dc36Sdarran  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*a864dc36Sdarran  * Use is subject to license terms.
25*a864dc36Sdarran  */
26*a864dc36Sdarran 
27*a864dc36Sdarran #ifndef	_DT_DOF_H
28*a864dc36Sdarran #define	_DT_DOF_H
29*a864dc36Sdarran 
30*a864dc36Sdarran #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*a864dc36Sdarran 
32*a864dc36Sdarran #include <dtrace.h>
33*a864dc36Sdarran 
34*a864dc36Sdarran #ifdef	__cplusplus
35*a864dc36Sdarran extern "C" {
36*a864dc36Sdarran #endif
37*a864dc36Sdarran 
38*a864dc36Sdarran #include <dt_buf.h>
39*a864dc36Sdarran 
40*a864dc36Sdarran typedef struct dt_dof {
41*a864dc36Sdarran 	dtrace_hdl_t *ddo_hdl;		/* libdtrace handle */
42*a864dc36Sdarran 	dtrace_prog_t *ddo_pgp;		/* current program */
43*a864dc36Sdarran 	uint_t ddo_nsecs;		/* number of sections */
44*a864dc36Sdarran 	dof_secidx_t ddo_strsec; 	/* global strings section index */
45*a864dc36Sdarran 	dof_secidx_t *ddo_xlimport;	/* imported xlator section indices */
46*a864dc36Sdarran 	dof_secidx_t *ddo_xlexport;	/* exported xlator section indices */
47*a864dc36Sdarran 	dt_buf_t ddo_secs;		/* section headers */
48*a864dc36Sdarran 	dt_buf_t ddo_strs;		/* global strings */
49*a864dc36Sdarran 	dt_buf_t ddo_ldata;		/* loadable section data */
50*a864dc36Sdarran 	dt_buf_t ddo_udata;		/* unloadable section data */
51*a864dc36Sdarran 	dt_buf_t ddo_probes;		/* probe section data */
52*a864dc36Sdarran 	dt_buf_t ddo_args;		/* probe arguments section data */
53*a864dc36Sdarran 	dt_buf_t ddo_offs;		/* probe offsets section data */
54*a864dc36Sdarran 	dt_buf_t ddo_enoffs;		/* is-enabled offsets section data */
55*a864dc36Sdarran 	dt_buf_t ddo_rels;		/* probe relocation section data */
56*a864dc36Sdarran 	dt_buf_t ddo_xlms;		/* xlate members section data */
57*a864dc36Sdarran } dt_dof_t;
58*a864dc36Sdarran 
59*a864dc36Sdarran extern void dt_dof_init(dtrace_hdl_t *);
60*a864dc36Sdarran extern void dt_dof_fini(dtrace_hdl_t *);
61*a864dc36Sdarran 
62*a864dc36Sdarran #ifdef	__cplusplus
63*a864dc36Sdarran }
64*a864dc36Sdarran #endif
65*a864dc36Sdarran 
66*a864dc36Sdarran #endif	/* _DT_DOF_H */
67