[BACK]Return to db_machdep.h CVS log [TXT][DIR] Up to [local] / sys / arch / vax / include

Annotation of sys/arch/vax/include/db_machdep.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: db_machdep.h,v 1.11 2005/11/06 22:21:30 miod Exp $    */
                      2: /*     $NetBSD: db_machdep.h,v 1.6 1998/08/10 14:33:33 ragge Exp $     */
                      3:
                      4: /*
                      5:  * Mach Operating System
                      6:  * Copyright (c) 1991,1990 Carnegie Mellon University
                      7:  * All Rights Reserved.
                      8:  *
                      9:  * Permission to use, copy, modify and distribute this software and its
                     10:  * documentation is hereby granted, provided that both the copyright
                     11:  * notice and this permission notice appear in all copies of the
                     12:  * software, derivative works or modified versions, and any portions
                     13:  * thereof, and that both notices appear in supporting documentation.
                     14:  *
                     15:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     16:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     17:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     18:  *
                     19:  * Carnegie Mellon requests users of this software to return to
                     20:  *
                     21:  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
                     22:  *  School of Computer Science
                     23:  *  Carnegie Mellon University
                     24:  *  Pittsburgh PA 15213-3890
                     25:  *
                     26:  * any improvements or extensions that they make and grant Carnegie Mellon
                     27:  * the rights to redistribute these changes.
                     28:  */
                     29:
                     30: #ifndef        _VAX_DB_MACHDEP_H_
                     31: #define        _VAX_DB_MACHDEP_H_
                     32:
                     33: /*
                     34:  * Machine-dependent defines for new kernel debugger.
                     35:  * Modified for vax out of i386 code.
                     36:  */
                     37:
                     38: #include <sys/param.h>
                     39: #include <uvm/uvm_extern.h>
                     40: #include <machine/trap.h>
                     41: #include <machine/psl.h>
                     42:
                     43: typedef        vaddr_t db_addr_t;              /* address - unsigned */
                     44: typedef        long            db_expr_t;      /* expression - signed */
                     45:
                     46: typedef struct trapframe db_regs_t;
                     47: db_regs_t      ddb_regs;       /* register state */
                     48: #define        DDB_REGS        (&ddb_regs)
                     49:
                     50: #define        PC_REGS(regs)   ((db_addr_t)(regs)->pc)
                     51: #define        SET_PC_REGS(regs, value)        (regs)->pc = (long)(value)
                     52:
                     53: #define        BKPT_INST       0x03            /* breakpoint instruction */
                     54: #define        BKPT_SIZE       (1)             /* size of breakpoint inst */
                     55: #define        BKPT_SET(inst)  (BKPT_INST)
                     56:
                     57: #define        FIXUP_PC_AFTER_BREAK(regs)      ((regs)->pc -= BKPT_SIZE)
                     58:
                     59: #define        db_clear_single_step(regs)      ((regs)->psl &= ~PSL_T)
                     60: #define        db_set_single_step(regs)        ((regs)->psl |=  PSL_T)
                     61:
                     62: #define        IS_BREAKPOINT_TRAP(type, code)  ((type) == T_BPTFLT)
                     63: #define IS_WATCHPOINT_TRAP(type, code) ((type) == T_TRCTRAP)
                     64:
                     65: #define        I_CALL          0xfb
                     66: #define        I_RET           0x04
                     67: #define        I_IRET          0x02
                     68:
                     69: #define        inst_trap_return(ins)   (((ins)&0xff) == I_IRET)
                     70: #define        inst_return(ins)        (((ins)&0xff) == I_RET)
                     71: #define        inst_call(ins)          (((ins)&0xff) == I_CALL)
                     72:
                     73: #define inst_load(ins)         0
                     74: #define inst_store(ins)                0
                     75:
                     76: /* Prototypes */
                     77: void   kdb_trap(struct trapframe *);
                     78:
                     79: /*
                     80:  * We use a.out symbols in DDB.
                     81:  */
                     82: #define        DB_AOUT_SYMBOLS
                     83:
                     84: #endif /* _VAX_DB_MACHDEP_H_ */

CVSweb