mdb_gcore.h revision 69a119caa6570c7077699161b7c28b6ee9f8b0f4
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright (c) 2013 by Delphix. All rights reserved.
*/
#ifndef _MDB_GCORE_H
#define _MDB_GCORE_H
/*
* The kernel has its own definition of exit which has a different signature
* than the user space definition. This seems to be the standard way to deal
* with this.
*/
#include <sys/cred_impl.h>
/* mdb versions of kernel structures used for ctf read calls */
typedef struct mdb_proc {
int p_lwpcnt;
int p_zombcnt;
char p_wcode;
int p_wdata;
} mdb_proc_t;
typedef struct mdb_kthread {
short t_sysnum;
int t_bind_pset;
short t_bind_cpu;
typedef struct mdb_seg {
} mdb_seg_t;
typedef struct mdb_as {
} mdb_as_t;
typedef struct mdb_segvn_data {
typedef struct mdb_vnode {
} mdb_vnode_t;
typedef struct mdb_znode {
} mdb_znode_t;
typedef struct mdb_tmpnode {
typedef struct mdb_vnodeops {
typedef struct mdb_shm_data {
typedef struct mdb_watched_page {
typedef struct mdb_pid {
} mdb_pid_t;
typedef struct mdb_sess {
} mdb_sess_t;
typedef struct mdb_task {
} mdb_task_t;
typedef struct mdb_kproject {
typedef struct mdb_zone {
} mdb_zone_t;
typedef struct mdb_sc_shared {
char sc_sigblock;
typedef struct mdb_klwp {
short lwp_badpriv;
char lwp_eosys;
} mdb_klwp_t;
typedef struct mdb_cpu {
} mdb_cpu_t;
typedef struct mdb_lpl {
} mdb_lpl_t;
typedef struct mdb_sigqueue {
typedef struct mdb_pool {
} mdb_pool_t;
typedef struct mdb_amp {
} mdb_amp_t;
typedef struct mdb_anon_hdr {
int flags;
typedef struct mdb_anon {
} mdb_anon_t;
/* Used to construct a linked list of prmap_ts */
typedef struct prmap_node {
struct prmap_node *next;
prmap_t m;
} prmap_node_t;
/* Fields common to psinfo_t and pstatus_t */
typedef struct pcommon {
int pc_nlwp;
int pc_nzomb;
char pc_dmodel;
} pcommon_t;
/* AVL walk callback structures */
typedef struct read_maps_cbarg {
mdb_proc_t *p;
int map_len;
typedef struct as_segat_cbarg {
typedef struct getwatchprot_cbarg {
struct gcore_segops;
typedef struct gcore_seg {
void *gs_data;
struct gcore_segops *gs_ops;
} gcore_seg_t;
/*
* These are the ISA-dependent functions that need to be
* implemented for ::gcore.
*/
extern int gcore_prisstep(mdb_klwp_t *);
extern int gcore_prgetrvals(mdb_klwp_t *, long *, long *);
#endif /* _MDB_GCORE_H */