The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/ddb/db_variables.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        db_variables.h,v $
   29  * Revision 2.7  93/11/17  16:26:37  dbg
   30  *      Added ANSI function prototypes.
   31  *      [93/10/07            dbg]
   32  * 
   33  * Revision 2.6  93/01/14  17:26:12  danner
   34  *      64bit cleanup.
   35  *      [92/11/30            af]
   36  * 
   37  * Revision 2.5  91/10/09  16:04:17  af
   38  *      Added suffix related field to db_variable structure.
   39  *      Added macro definitions of db_{read,write}_variable.
   40  *      [91/08/29            tak]
   41  * 
   42  * Revision 2.4  91/05/14  15:37:12  mrt
   43  *      Correcting copyright
   44  * 
   45  * Revision 2.3  91/02/05  17:07:23  mrt
   46  *      Changed to new Mach copyright
   47  *      [91/01/31  16:19:54  mrt]
   48  * 
   49  * Revision 2.2  90/08/27  21:53:40  dbg
   50  *      Modularized typedef name.  Documented the calling sequence of
   51  *      the (optional) access function of a variable.  Now the valuep
   52  *      field can be made opaque, eg be an offset that fcn() resolves.
   53  *      [90/08/20            af]
   54  * 
   55  *      Created.
   56  *      [90/07/25            dbg]
   57  * 
   58  */
   59 /*
   60  *      Author: David B. Golub, Carnegie Mellon University
   61  *      Date:   7/90
   62  */
   63 
   64 #ifndef _DB_VARIABLES_H_
   65 #define _DB_VARIABLES_H_
   66 
   67 #include <mach/boolean.h>
   68 #include <kern/kern_types.h>    /* for thread_t */
   69 #include <machine/db_machdep.h>
   70 
   71 /*
   72  * Debugger variables.
   73  */
   74 struct db_variable;             /* forward */
   75 struct db_var_aux_param;        /* forward */
   76 
   77 typedef
   78 void (*db_rw_var_fcn_t)(
   79         struct db_variable      *vp,
   80         db_expr_t               *valuep,
   81         int                     rw_flag,
   82         struct db_var_aux_param *ap);
   83 
   84 struct db_variable {
   85         char    *name;          /* Name of variable */
   86         db_expr_t *valuep;      /* pointer to value of variable */
   87         db_rw_var_fcn_t fcn;    /* function to call when reading/writing */
   88         short   min_level;      /* number of minimum suffix levels */
   89         short   max_level;      /* number of maximum suffix levels */
   90         short   low;            /* low value of level 1 suffix */
   91         short   high;           /* high value of level 1 suffix */
   92 #define DB_VAR_GET      0
   93 #define DB_VAR_SET      1
   94 };
   95 #define FCN_NULL        ((db_rw_var_fcn_t) 0)
   96 
   97 #define DB_VAR_LEVEL    3       /* maximum number of suffix level */
   98 
   99 #define db_read_variable(vp, valuep)    \
  100         db_read_write_variable(vp, valuep, DB_VAR_GET, 0)
  101 #define db_write_variable(vp, valuep)   \
  102         db_read_write_variable(vp, valuep, DB_VAR_SET, 0)
  103 
  104 /*
  105  * auxiliary parameters passed to a variable handler
  106  */
  107 struct db_var_aux_param {
  108         char            *modif;                 /* option strings */
  109         short           level;                  /* number of levels */
  110         short           suffix[DB_VAR_LEVEL];   /* suffix */
  111         thread_t        thread;                 /* target task */
  112 };
  113 
  114 typedef struct db_var_aux_param *db_var_aux_param_t;
  115         
  116 
  117 extern struct db_variable       db_vars[];      /* debugger variables */
  118 extern struct db_variable       *db_evars;
  119 extern struct db_variable       db_regs[];      /* machine registers */
  120 extern struct db_variable       *db_eregs;
  121 
  122 extern boolean_t
  123 db_get_variable(
  124         db_expr_t       *valuep);
  125 
  126 extern boolean_t
  127 db_set_variable(
  128         db_expr_t       value);
  129 
  130 extern void
  131 db_read_write_variable(
  132         struct db_variable      *vp,
  133         db_expr_t               *valuep,
  134         int                     rw_flag,
  135         db_var_aux_param_t      ap);
  136 
  137 extern void
  138 db_set_cmd();
  139 
  140 #endif  /* _DB_VARIABLES_H_ */

Cache object: 2c49da37722bf8aec81dfb1ecefe2bea


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.