mdb_ctf.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MDB_CTF_H
#define _MDB_CTF_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <mdb/mdb_target.h>
#include <libctf.h>
#ifdef _MDB
#endif
/*
* The following directive tells the mapfile generator that prototypes and
* declarations ending with an "Internal" comment should be excluded from the
* mapfile.
*
* MAPFILE: exclude "Internal"
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef struct mdb_ctf_id {
void *_opaque[2];
} mdb_ctf_id_t;
typedef struct mdb_ctf_funcinfo {
typedef struct mdb_ctf_arinfo {
typedef int mdb_ctf_enum_f(const char *, int, void *);
typedef int mdb_ctf_type_f(mdb_ctf_id_t, void *);
extern int mdb_ctf_enabled_by_object(const char *);
extern int mdb_ctf_lookup_by_name(const char *, mdb_ctf_id_t *);
extern int mdb_ctf_module_lookup(const char *, mdb_ctf_id_t *);
mdb_ctf_id_t *);
extern void mdb_ctf_type_invalidate(mdb_ctf_id_t *);
extern int mdb_ctf_type_valid(mdb_ctf_id_t);
extern int mdb_ctf_type_kind(mdb_ctf_id_t);
extern const char *mdb_ctf_enum_name(mdb_ctf_id_t, int);
extern int mdb_ctf_type_iter(const char *, mdb_ctf_type_f *, void *);
/* utility stuff */
extern int mdb_ctf_member_info(mdb_ctf_id_t, const char *,
ulong_t *, mdb_ctf_id_t *);
extern int mdb_ctf_num_members(mdb_ctf_id_t);
int, mdb_ctf_id_t *, ulong_t *);
#define MDB_CTF_VREAD_IGNORE_GROW 0x01
#define MDB_CTF_VREAD_IGNORE_ABSENT 0x02
#define MDB_CTF_VREAD_IGNORE_UNIONS 0x04
#define MDB_CTF_VREAD_IGNORE_ALL 0x07
extern int mdb_ctf_readsym(void *, const char *, const char *, uint_t);
#ifdef _MDB
#endif
#ifdef __cplusplus
}
#endif
#endif /* _MDB_CTF_H */