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

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

1.1     ! nbrk        1: /*     $OpenBSD: db_machdep.h,v 1.8 2005/04/19 15:23:37 miod Exp $ */
        !             2:
        !             3: /*
        !             4:  * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se)
        !             5:  *
        !             6:  * Redistribution and use in source and binary forms, with or without
        !             7:  * modification, are permitted provided that the following conditions
        !             8:  * are met:
        !             9:  * 1. Redistributions of source code must retain the above copyright
        !            10:  *    notice, this list of conditions and the following disclaimer.
        !            11:  * 2. Redistributions in binary form must reproduce the above copyright
        !            12:  *    notice, this list of conditions and the following disclaimer in the
        !            13:  *    documentation and/or other materials provided with the distribution.
        !            14:  *
        !            15:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
        !            16:  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        !            17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            18:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
        !            19:  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            20:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            21:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            22:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            23:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            24:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            25:  * SUCH DAMAGE.
        !            26:  *
        !            27:  */
        !            28:
        !            29: #ifndef        _MIPS_DB_MACHDEP_H_
        !            30: #define        _MIPS_DB_MACHDEP_H_
        !            31:
        !            32: #include <machine/frame.h>
        !            33: #include <machine/trap.h>
        !            34: #include <uvm/uvm_param.h>
        !            35:
        !            36: #define DB_MACHINE_COMMANDS    /* We have machine specific commands */
        !            37: #define        DB_ELF_SYMBOLS          /* Elf style symbol table support */
        !            38:
        !            39: typedef struct trap_frame db_regs_t;
        !            40: extern db_regs_t       ddb_regs;
        !            41:
        !            42: typedef        long            db_expr_t;
        !            43: typedef vaddr_t                db_addr_t;
        !            44:
        !            45: #define        SOFTWARE_SSTEP          /* Need software single step */
        !            46: #define        SOFTWARE_SSTEP_EMUL     /* next_instr_address() emulates 100% */
        !            47: db_addr_t      next_instr_address(db_addr_t, boolean_t);
        !            48: #define        BKPT_SIZE   (4)
        !            49: #define        BKPT_SET(ins)   (BREAK_DDB)
        !            50: #define        DB_VALID_BREAKPOINT(addr)       (((addr) & 3) == 0)
        !            51:
        !            52: #define        IS_BREAKPOINT_TRAP(type, code)  ((type) == T_BREAK)
        !            53: #define IS_WATCHPOINT_TRAP(type, code) (0)     /* XXX mips3 watchpoint */
        !            54:
        !            55: #define        PC_REGS(regs)   ((db_addr_t)(regs)->pc)
        !            56: #define        SET_PC_REGS(regs, value)        (regs)->pc = (register_t)(value)
        !            57: #define DDB_REGS       (&ddb_regs)
        !            58:
        !            59: /*
        !            60:  *  Test of instructions to see class.
        !            61:  */
        !            62: #define        IT_CALL         0x01
        !            63: #define        IT_BRANCH       0x02
        !            64: #define        IT_LOAD         0x03
        !            65: #define        IT_STORE        0x04
        !            66:
        !            67: #define        inst_branch(i)  (db_inst_type(i) == IT_BRANCH)
        !            68: #define        inst_trap_return(i)     ((i) & 0)
        !            69: #define        inst_call(i)    (db_inst_type(i) == IT_CALL)
        !            70: #define        inst_return(i)  ((i) == 0x03e00008)
        !            71: #define        inst_load(i)    (db_inst_type(i) == IT_LOAD)
        !            72: #define        inst_store(i)   (db_inst_type(i) == IT_STORE)
        !            73:
        !            74: int db_inst_type(int);
        !            75: void db_machine_init(void);
        !            76:
        !            77: #endif /* !_MIPS_DB_MACHDEP_H_ */

CVSweb