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) 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.6  93/01/14  17:26:12  danner
   30  *      64bit cleanup.
   31  *      [92/11/30            af]
   32  * 
   33  * Revision 2.5  91/10/09  16:04:17  af
   34  *      Added suffix related field to db_variable structure.
   35  *      Added macro definitions of db_{read,write}_variable.
   36  *      [91/08/29            tak]
   37  * 
   38  * Revision 2.4  91/05/14  15:37:12  mrt
   39  *      Correcting copyright
   40  * 
   41  * Revision 2.3  91/02/05  17:07:23  mrt
   42  *      Changed to new Mach copyright
   43  *      [91/01/31  16:19:54  mrt]
   44  * 
   45  * Revision 2.2  90/08/27  21:53:40  dbg
   46  *      Modularized typedef name.  Documented the calling sequence of
   47  *      the (optional) access function of a variable.  Now the valuep
   48  *      field can be made opaque, eg be an offset that fcn() resolves.
   49  *      [90/08/20            af]
   50  * 
   51  *      Created.
   52  *      [90/07/25            dbg]
   53  * 
   54  */
   55 /*
   56  *      Author: David B. Golub, Carnegie Mellon University
   57  *      Date:   7/90
   58  */
   59 
   60 #ifndef _DB_VARIABLES_H_
   61 #define _DB_VARIABLES_H_
   62 
   63 #include <kern/thread.h>
   64 
   65 /*
   66  * Debugger variables.
   67  */
   68 struct db_variable {
   69         char    *name;          /* Name of variable */
   70         db_expr_t *valuep;      /* pointer to value of variable */
   71                                 /* function to call when reading/writing */
   72         int     (*fcn)(/* db_variable, db_expr_t, int, db_var_aux_param_t */);
   73         short   min_level;      /* number of minimum suffix levels */
   74         short   max_level;      /* number of maximum suffix levels */
   75         short   low;            /* low value of level 1 suffix */
   76         short   high;           /* high value of level 1 suffix */
   77 #define DB_VAR_GET      0
   78 #define DB_VAR_SET      1
   79 };
   80 #define FCN_NULL        ((int (*)())0)
   81 
   82 #define DB_VAR_LEVEL    3       /* maximum number of suffix level */
   83 
   84 #define db_read_variable(vp, valuep)    \
   85         db_read_write_variable(vp, valuep, DB_VAR_GET, 0)
   86 #define db_write_variable(vp, valuep)   \
   87         db_read_write_variable(vp, valuep, DB_VAR_SET, 0)
   88 
   89 /*
   90  * auxiliary parameters passed to a variable handler
   91  */
   92 struct db_var_aux_param {
   93         char            *modif;                 /* option strings */
   94         short           level;                  /* number of levels */
   95         short           suffix[DB_VAR_LEVEL];   /* suffix */
   96         thread_t        thread;                 /* target task */
   97 };
   98 
   99 typedef struct db_var_aux_param *db_var_aux_param_t;
  100         
  101 
  102 extern struct db_variable       db_vars[];      /* debugger variables */
  103 extern struct db_variable       *db_evars;
  104 extern struct db_variable       db_regs[];      /* machine registers */
  105 extern struct db_variable       *db_eregs;
  106 
  107 #endif  /* _DB_VARIABLES_H_ */

Cache object: 7d22a4bfc32fd5d045612d82d96d0132


[ 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.