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

Annotation of sys/arch/m88k/include/db_machdep.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: db_machdep.h,v 1.12 2007/01/13 22:00:56 miod Exp $ */
        !             2: /*
        !             3:  * Mach Operating System
        !             4:  * Copyright (c) 1993-1991 Carnegie Mellon University
        !             5:  * Copyright (c) 1991 OMRON Corporation
        !             6:  * All Rights Reserved.
        !             7:  *
        !             8:  * Permission to use, copy, modify and distribute this software and its
        !             9:  * documentation is hereby granted, provided that both the copyright
        !            10:  * notice and this permission notice appear in all copies of the
        !            11:  * software, derivative works or modified versions, and any portions
        !            12:  * thereof, and that both notices appear in supporting documentation.
        !            13:  *
        !            14:  * CARNEGIE MELLON AND OMRON ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS IS"
        !            15:  * CONDITION.  CARNEGIE MELLON AND OMRON DISCLAIM ANY LIABILITY OF ANY KIND
        !            16:  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
        !            17:  *
        !            18:  * Carnegie Mellon requests users of this software to return to
        !            19:  *
        !            20:  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
        !            21:  *  School of Computer Science
        !            22:  *  Carnegie Mellon University
        !            23:  *  Pittsburgh PA 15213-3890
        !            24:  *
        !            25:  * any improvements or extensions that they make and grant Carnegie the
        !            26:  * rights to redistribute these changes.
        !            27:  */
        !            28:
        !            29: #ifndef  _M88K_DB_MACHDEP_H_
        !            30: #define  _M88K_DB_MACHDEP_H_
        !            31:
        !            32: /* trap numbers used by ddb */
        !            33: #define        DDB_ENTRY_BKPT_NO       130
        !            34: #define        DDB_ENTRY_TRACE_NO      131
        !            35: #define DDB_ENTRY_TRAP_NO      132
        !            36:
        !            37: #ifndef        _LOCORE
        !            38:
        !            39: #include <machine/reg.h>
        !            40: #include <machine/trap.h>
        !            41:
        !            42: #include <uvm/uvm_param.h>
        !            43:
        !            44: #define        SET_PC_REGS(regs, value)                                        \
        !            45: do {                                                                   \
        !            46:        (regs)->sxip = (value);                                         \
        !            47:        (regs)->snip = (value) + 4;                                     \
        !            48: } while (0)
        !            49:
        !            50: #ifdef DDB
        !            51:
        !            52: #define BKPT_SIZE      (4)     /* number of bytes in bkpt inst. */
        !            53: #define BKPT_INST      (0xf000d000 | DDB_ENTRY_BKPT_NO) /* tb0, 0,r0, 130 */
        !            54: #define BKPT_SET(inst) (BKPT_INST)
        !            55:
        !            56: /* Entry trap for the debugger - used for inline assembly breaks*/
        !            57: #define ENTRY_ASM              "tb0 0, r0, 132"
        !            58:
        !            59: typedef        vaddr_t         db_addr_t;
        !            60: typedef        long            db_expr_t;
        !            61: typedef        struct reg      db_regs_t;
        !            62: extern db_regs_t       ddb_regs;       /* register state */
        !            63: #define        DDB_REGS        (&ddb_regs)
        !            64:
        !            65: int    inst_load(u_int);
        !            66: int    inst_store(u_int);
        !            67: int    ddb_break_trap(int, db_regs_t *);
        !            68: int    ddb_entry_trap(int, db_regs_t *);
        !            69: void   m88k_print_instruction(int, u_int, u_int32_t);  /* db_disasm.c */
        !            70:
        !            71: /*
        !            72:  * inst_call(ins) - is the instruction a function call.
        !            73:  * Could be either bsr or jsr.
        !            74:  */
        !            75: #define        inst_call(I) \
        !            76:        (((I) & 0xf8000000) == 0xc8000000 /* bsr */ || \
        !            77:         ((I) & 0xfffffbe0) == 0xf400c800 /* jsr */)
        !            78: /*
        !            79:  * inst_return(ins) - is the instruction a function call return.
        !            80:  * Not mutually exclusive with inst_branch. Should be a jmp r1.
        !            81:  */
        !            82: #define        inst_return(I)  (((I) & 0xfffffbff) == 0xf400c001)
        !            83:
        !            84: /*
        !            85:  * inst_trap_return(ins) - is the instruction a return from trap.
        !            86:  * Should be a rte.
        !            87:  */
        !            88: #define        inst_trap_return(I)     ((I) == 0xf400c000)
        !            89:
        !            90: /* breakpoint/watchpoint foo */
        !            91: #define IS_BREAKPOINT_TRAP(type,code) ((type)==T_KDB_BREAK)
        !            92: #define IS_WATCHPOINT_TRAP(type,code) 0
        !            93:
        !            94: /* machine specific commands have been added to ddb */
        !            95: #define DB_MACHINE_COMMANDS
        !            96:
        !            97: #define        DB_AOUT_SYMBOLS
        !            98:
        !            99: #endif /* DDB */
        !           100: #endif /* _LOCORE */
        !           101:
        !           102: #endif /* _M88K_DB_MACHDEP_H_ */

CVSweb