/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _DT_IMPL_H
#define _DT_IMPL_H
#include <setjmp.h>
#include <libctf.h>
#include <dtrace.h>
#include <gelf.h>
#include <synch.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <dt_parser.h>
#include <dt_regset.h>
#include <dt_inttab.h>
#include <dt_strtab.h>
#include <dt_ident.h>
#include <dt_list.h>
#include <dt_decl.h>
#include <dt_as.h>
#include <dt_proc.h>
#include <dt_dof.h>
#include <dt_pcb.h>
struct dt_module; /* see below */
struct dt_pfdict; /* see <dt_printf.h> */
struct dt_arg; /* see below */
struct dt_provider; /* see <dt_provider.h> */
struct dt_xlator; /* see <dt_xlator.h> */
typedef struct dt_intrinsic {
typedef struct dt_typedef {
} dt_typedef_t;
typedef struct dt_intdesc {
} dt_intdesc_t;
typedef struct dt_modops {
} dt_modops_t;
typedef struct dt_arg {
} dt_arg_t;
typedef struct dt_sym {
} dt_sym_t;
typedef struct dt_module {
} dt_module_t;
typedef struct dt_provmod {
} dt_provmod_t;
typedef struct dt_ahashent {
typedef struct dt_ahash {
} dt_ahash_t;
typedef struct dt_aggregate {
typedef struct dt_print_aggdata {
typedef struct dt_dirpath {
} dt_dirpath_t;
typedef struct dt_lib_depend {
struct dtrace_hdl {
};
/*
* Values for the user arg of the ECB.
*/
#define DT_ECB_DEFAULT 0
/*
* Values for the dt_linkmode property, which is used by the assembler when
* processing external symbol references. User can set using -xlink=<mode>.
*/
/*
* Values for the dt_linktype property, which is used by dtrace_program_link()
* to determine the type of output file that is desired by the client.
*/
/*
* Values for the dt_xlatemode property, which is used to determine whether
* references to dynamic translators are permitted. Set using -xlate=<mode>.
*/
/*
* Values for the dt_stdcmode property, which is used by the compiler when
* running cpp to determine the presence and setting of the __STDC__ macro.
*/
/*
* Macro to test whether a given pass bit is set in the dt_treedump bit-vector.
* If the bit for pass 'p' is set, the D compiler displays the parse tree for
* the program by printing it to stderr at the end of compiler pass 'p'.
*/
/*
* Macros for accessing the cached CTF container and type ID for the common
* types "int", "string", and <DYN>, which we need to use frequently in the D
* compiler. The DT_INT_* macro relies upon "int" being at index 0 in the
* _dtrace_ints_* tables in dt_open.c; the others are also set up there.
*/
/*
* Actions and subroutines are both DT_NODE_FUNC nodes; to avoid confusing
* an action for a subroutine (or vice versa), we assure that the DT_ACT_*
* constants and the DIF_SUBR_* constants occupy non-overlapping ranges by
* starting the DT_ACT_* constants at DIF_SUBR_MAX + 1.
*/
/*
* Sentinel to tell freopen() to restore the saved stdout. This must not
* be ever valid for opening for write access via freopen(3C), which of
* course, "." never is.
*/
enum {
};
/*
* Interfaces for parsing and comparing DTrace attribute tuples, which describe
* stability and architectural binding information. The dtrace_attribute_t
*/
/*
* Interfaces for parsing and handling DTrace version strings. Version binding
* is a feature of the D compiler that is handled completely independently of
* the DTrace kernel infrastructure, so the definitions are here in libdtrace.
* Version strings are compiled into an encoded uint32_t which can be compared
* using C comparison operators. Version definitions are found in dt_open.c.
*/
#define DT_VERSION_NUMBER(M, m, u) \
((((M) & 0xFF) << 24) | (((m) & 0xFFF) << 12) | ((u) & 0xFFF))
extern int dt_version_str2num(const char *, dt_version_t *);
extern int dt_version_defined(dt_version_t);
/*
* Miscellaneous internal libdtrace interfaces. The definitions below are for
* libdtrace routines that do not yet merit their own separate header file.
*/
extern char *dt_cpp_add_arg(dtrace_hdl_t *, const char *);
extern char *dt_cpp_pop_arg(dtrace_hdl_t *);
extern int dt_set_errno(dtrace_hdl_t *, int);
extern void dt_set_errmsg(dtrace_hdl_t *, const char *, const char *,
const char *, int, const char *, va_list);
extern int dt_ioctl(dtrace_hdl_t *, int, void *);
extern long dt_sysconf(dtrace_hdl_t *, int);
extern void dt_free(dtrace_hdl_t *, void *);
extern int dt_gmatch(const char *, const char *);
extern char *dt_basename(char *);
extern int dt_buffered_enable(dtrace_hdl_t *);
extern void dt_buffered_disable(dtrace_hdl_t *);
extern void dt_buffered_destroy(dtrace_hdl_t *);
extern int dt_options_load(dtrace_hdl_t *);
extern void dt_dprintf(const char *, ...);
extern void dt_endcontext(dtrace_hdl_t *);
extern int dt_aggregate_go(dtrace_hdl_t *);
extern int dt_aggregate_init(dtrace_hdl_t *);
extern void dt_aggregate_destroy(dtrace_hdl_t *);
dtrace_eprobedesc_t **, dtrace_probedesc_t **);
extern void dt_epid_destroy(dtrace_hdl_t *);
extern void dt_aggid_destroy(dtrace_hdl_t *);
extern void *dt_format_lookup(dtrace_hdl_t *, int);
extern void dt_format_destroy(dtrace_hdl_t *);
extern int dt_print_agg(const dtrace_aggdata_t *, void *);
extern int dt_handle_liberr(dtrace_hdl_t *,
const dtrace_probedata_t *, const char *);
extern int dt_handle_status(dtrace_hdl_t *,
dtrace_status_t *, dtrace_status_t *);
extern char yyintprefix; /* int token prefix for macros (+/-) */
extern int yyintdecimal; /* int token is decimal (1) or octal/hex (0) */
extern char yytext[]; /* lex input buffer */
extern int yylineno; /* lex line number */
extern int yydebug; /* lex debugging */
extern const char *const _dtrace_version; /* current version string */
extern int _dtrace_strbuckets; /* number of hash buckets for strings */
extern int _dtrace_intbuckets; /* number of hash buckets for ints */
extern int _dtrace_debug; /* debugging messages enabled */
extern int _dtrace_argmax; /* default maximum probe arguments */
extern const char *_dtrace_libdir; /* default library directory */
extern const char *_dtrace_moddir; /* default kernel module directory */
#ifdef __cplusplus
}
#endif
#endif /* _DT_IMPL_H */