/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* This header file defines the interfaces available from the CTF debugger
* library, libctf, and an equivalent kernel module. This API can be used by
* a debugger to operate on data in the Compact ANSI-C Type Format (CTF).
* This is NOT a public interface, although it may eventually become one in
* the fullness of time after we gain more experience with the interfaces.
*
* In the meantime, be aware that any program linked with this API in this
* release of Solaris is almost guaranteed to break in the next release.
*
* In short, do not user this header file or the CTF routines for any purpose.
*/
#ifndef _CTF_API_H
#define _CTF_API_H
#ifndef VBOX
# pragma ident "%Z%%M% %I% %E% SMI"
#endif
#ifndef VBOX
#else
# include "VBoxDTraceTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Clients can open one or more CTF containers and obtain a pointer to an
* opaque ctf_file_t. Types are identified by an opaque ctf_id_t token.
* These opaque definitions allow libctf to evolve without breaking clients.
*/
typedef long ctf_id_t;
/*
* If the debugger needs to provide the CTF library with a set of raw buffers
* for use as the CTF data, symbol table, and string table, it can do so by
* filling in ctf_sect_t structures and passing them to ctf_bufopen():
*/
typedef struct ctf_sect {
#ifndef VBOX
#else
#endif
} ctf_sect_t;
/*
* Encoding information for integers, floating-point values, and certain other
* intrinsics can be obtained by calling ctf_type_encoding(), below. The flags
*/
typedef struct ctf_encoding {
typedef struct ctf_membinfo {
typedef struct ctf_arinfo {
} ctf_arinfo_t;
typedef struct ctf_funcinfo {
typedef struct ctf_lblinfo {
/*
* Functions that return integer status or a ctf_id_t use the following value
* to indicate failure. ctf_errno() can be used to obtain an error code.
*/
/*
* The CTF data model is inferred to be the caller's data model or the data
* model of the given object, unless ctf_setmodel() is explicitly called.
*/
#ifdef _LP64
#else
#endif
/*
* Dynamic CTF containers can be created using ctf_create(). The ctf_add_*
* routines can be used to add new definitions to the dynamic container.
* New types are labeled as root or non-root to determine whether they are
* visible at the top-level program scope when subsequently doing a lookup.
*/
/*
* These typedefs are used to define the signature for callback functions
* that can be used with the iteration and visit functions below:
*/
typedef int ctf_enum_f(const char *, int, void *);
const ctf_sect_t *, int *);
extern ctf_file_t *ctf_fdopen(int, int *);
extern ctf_file_t *ctf_open(const char *, int *);
extern ctf_file_t *ctf_create(int *);
extern void ctf_close(ctf_file_t *);
extern const char *ctf_parent_name(ctf_file_t *);
extern int ctf_setmodel(ctf_file_t *, int);
extern int ctf_getmodel(ctf_file_t *);
extern void ctf_setspecific(ctf_file_t *, void *);
extern void *ctf_getspecific(ctf_file_t *);
extern int ctf_errno(ctf_file_t *);
extern const char *ctf_errmsg(int);
extern int ctf_version(int);
ctf_membinfo_t *);
extern const char *ctf_label_topmost(ctf_file_t *);
const char *, const ctf_encoding_t *);
const ctf_funcinfo_t *, const ctf_id_t *);
const char *, const ctf_encoding_t *);
extern int ctf_update(ctf_file_t *);
extern int ctf_discard(ctf_file_t *);
extern int ctf_write(ctf_file_t *, int);
#ifdef _KERNEL
struct module;
#endif
#ifdef __cplusplus
}
#endif
#endif /* _CTF_API_H */