Print this page
11626 introduce /etc/versions/build
11627 clean up UUID code for ::status


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 




  26 #ifndef _MDB_KS_H
  27 #define _MDB_KS_H
  28 
  29 #include <sys/types.h>
  30 #include <sys/int_types.h>
  31 #include <sys/stream.h>
  32 #include <sys/vnode.h>
  33 #include <sys/proc.h>
  34 #include <sys/dumphdr.h>
  35 #include <sys/auxv.h>
  36 
  37 #ifdef  __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 /*
  42  * MDB Kernel Support Interfaces:
  43  *
  44  * Debugger modules for kernel crash dumps can make use of these utility
  45  * functions.  This module also provides support for <mdb/mdb_param.h>.


 123 
 124 extern uintptr_t mdb_qrnext(const queue_t *);
 125 extern uintptr_t mdb_qwnext(const queue_t *);
 126 
 127 /*
 128  * These functions, provided by mdb_ks, may be used to fill in the q_rnext
 129  * and q_wnext members of mdb_qops_t, in the case where the client wishes
 130  * to simply return q->q_next:
 131  */
 132 extern uintptr_t mdb_qrnext_default(const queue_t *);
 133 extern uintptr_t mdb_qwnext_default(const queue_t *);
 134 
 135 extern int mdb_mblk_count(const mblk_t *);
 136 
 137 /* DLPI primitive to string; returns NULL for unknown primitives */
 138 extern const char *mdb_dlpi_prim(int);
 139 
 140 /* Generic function for working with MAC (network layer 2) addresses. */
 141 extern void mdb_mac_addr(const uint8_t *, size_t, char *, size_t);
 142 


 143 /*
 144  * Target-specific interfaces
 145  *
 146  * The existence and accessibility of the functions listed below is relied upon
 147  * by the indicated targets.  The targets look up and invoke these functions in
 148  * mdb_ks so that dependencies on the current kernel implementation are
 149  * isolated in mdb_ks.
 150  */
 151 
 152 /*
 153  * MDB KPROC Target Interface:
 154  * (user processes from kernel crash dump)
 155  */
 156 
 157 struct mdb_map; /* Private between kproc and ks */
 158 
 159 extern int mdb_kproc_asiter(uintptr_t,
 160     void (*)(const struct mdb_map *, void *), void *);
 161 extern int mdb_kproc_auxv(uintptr_t, auxv_t *);
 162 extern uintptr_t mdb_kproc_as(uintptr_t);




   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * Copyright 2019 Joyent, Inc.
  28  */
  29 
  30 #ifndef _MDB_KS_H
  31 #define _MDB_KS_H
  32 
  33 #include <sys/types.h>
  34 #include <sys/int_types.h>
  35 #include <sys/stream.h>
  36 #include <sys/vnode.h>
  37 #include <sys/proc.h>
  38 #include <sys/dumphdr.h>
  39 #include <sys/auxv.h>
  40 
  41 #ifdef  __cplusplus
  42 extern "C" {
  43 #endif
  44 
  45 /*
  46  * MDB Kernel Support Interfaces:
  47  *
  48  * Debugger modules for kernel crash dumps can make use of these utility
  49  * functions.  This module also provides support for <mdb/mdb_param.h>.


 127 
 128 extern uintptr_t mdb_qrnext(const queue_t *);
 129 extern uintptr_t mdb_qwnext(const queue_t *);
 130 
 131 /*
 132  * These functions, provided by mdb_ks, may be used to fill in the q_rnext
 133  * and q_wnext members of mdb_qops_t, in the case where the client wishes
 134  * to simply return q->q_next:
 135  */
 136 extern uintptr_t mdb_qrnext_default(const queue_t *);
 137 extern uintptr_t mdb_qwnext_default(const queue_t *);
 138 
 139 extern int mdb_mblk_count(const mblk_t *);
 140 
 141 /* DLPI primitive to string; returns NULL for unknown primitives */
 142 extern const char *mdb_dlpi_prim(int);
 143 
 144 /* Generic function for working with MAC (network layer 2) addresses. */
 145 extern void mdb_mac_addr(const uint8_t *, size_t, char *, size_t);
 146 
 147 extern void mdb_print_buildversion(void);
 148 
 149 /*
 150  * Target-specific interfaces
 151  *
 152  * The existence and accessibility of the functions listed below is relied upon
 153  * by the indicated targets.  The targets look up and invoke these functions in
 154  * mdb_ks so that dependencies on the current kernel implementation are
 155  * isolated in mdb_ks.
 156  */
 157 
 158 /*
 159  * MDB KPROC Target Interface:
 160  * (user processes from kernel crash dump)
 161  */
 162 
 163 struct mdb_map; /* Private between kproc and ks */
 164 
 165 extern int mdb_kproc_asiter(uintptr_t,
 166     void (*)(const struct mdb_map *, void *), void *);
 167 extern int mdb_kproc_auxv(uintptr_t, auxv_t *);
 168 extern uintptr_t mdb_kproc_as(uintptr_t);