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/i386/include/db_machdep.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
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  * $FreeBSD: releng/5.1/sys/i386/include/db_machdep.h 83506 2001-09-15 11:06:07Z dfr $
   27  */
   28 
   29 #ifndef _MACHINE_DB_MACHDEP_H_
   30 #define _MACHINE_DB_MACHDEP_H_
   31 
   32 #include <machine/frame.h>
   33 #include <machine/psl.h>
   34 #include <machine/trap.h>
   35 
   36 #define i386_saved_state trapframe
   37 
   38 typedef vm_offset_t     db_addr_t;      /* address - unsigned */
   39 typedef int             db_expr_t;      /* expression - signed */
   40 
   41 typedef struct i386_saved_state db_regs_t;
   42 extern db_regs_t        ddb_regs;       /* register state */
   43 #define DDB_REGS        (&ddb_regs)
   44 
   45 #define PC_REGS(regs)   ((db_addr_t)(regs)->tf_eip)
   46 
   47 #define BKPT_INST       0xcc            /* breakpoint instruction */
   48 #define BKPT_SIZE       (1)             /* size of breakpoint inst */
   49 #define BKPT_SET(inst)  (BKPT_INST)
   50 
   51 #define BKPT_SKIP               ddb_regs.tf_eip += 1
   52 
   53 #define FIXUP_PC_AFTER_BREAK    ddb_regs.tf_eip -= 1;
   54 
   55 #define db_clear_single_step(regs)      ((regs)->tf_eflags &= ~PSL_T)
   56 #define db_set_single_step(regs)        ((regs)->tf_eflags |=  PSL_T)
   57 
   58 #define IS_BREAKPOINT_TRAP(type, code)  ((type) == T_BPTFLT)
   59 /*
   60  * Watchpoints are not supported.  The debug exception type is in %dr6
   61  * and not yet in the args to this macro.
   62  */
   63 #define IS_WATCHPOINT_TRAP(type, code)  0
   64 
   65 #define I_CALL          0xe8
   66 #define I_CALLI         0xff
   67 #define I_RET           0xc3
   68 #define I_IRET          0xcf
   69 
   70 #define inst_trap_return(ins)   (((ins)&0xff) == I_IRET)
   71 #define inst_return(ins)        (((ins)&0xff) == I_RET)
   72 #define inst_call(ins)          (((ins)&0xff) == I_CALL || \
   73                                  (((ins)&0xff) == I_CALLI && \
   74                                   ((ins)&0x3800) == 0x1000))
   75 #define inst_load(ins)          0
   76 #define inst_store(ins)         0
   77 
   78 /*
   79  * There no interesting addresses below _kstack = 0xefbfe000.  There
   80  * are small absolute values for GUPROF, but we don't want to see them.
   81  * Treat "negative" addresses below _kstack as non-small to allow for
   82  * future reductions of _kstack and to avoid sign extension problems.
   83  *
   84  * There is one interesting symbol above -db_maxoff = 0xffff0000,
   85  * namely _APTD = 0xfffff000.  Accepting this would mess up the
   86  * printing of small negative offsets.  The next largest symbol is
   87  * _APTmap = 0xffc00000.  Accepting this is OK (unless db_maxoff is
   88  * set to >= 0x400000 - (max stack offset)).
   89  */
   90 #define DB_SMALL_VALUE_MAX      0x7fffffff
   91 #define DB_SMALL_VALUE_MIN      (-0x400001)
   92 
   93 #endif /* !_MACHINE_DB_MACHDEP_H_ */

Cache object: dd0ca52b4ea299852ca3df2d37337884


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