[BACK]Return to db_interface.c CVS log [TXT][DIR] Up to [local] / sys / arch / macppc / macppc

Annotation of sys/arch/macppc/macppc/db_interface.c, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: db_interface.c,v 1.7 2003/10/15 17:50:16 drahn Exp $  */
        !             2: /*      $NetBSD: db_interface.c,v 1.12 2001/07/22 11:29:46 wiz Exp $ */
        !             3:
        !             4: #include <sys/param.h>
        !             5: #include <sys/proc.h>
        !             6: #include <sys/systm.h>
        !             7:
        !             8: #include <dev/cons.h>
        !             9:
        !            10: #include <machine/db_machdep.h>
        !            11: #include <ddb/db_extern.h>
        !            12:
        !            13: int ddb_trap_glue(struct trapframe *frame); /* called from locore */
        !            14:
        !            15: void
        !            16: Debugger()
        !            17: {
        !            18:        ddb_trap();
        !            19: }
        !            20:
        !            21: int
        !            22: ddb_trap_glue(struct trapframe *frame)
        !            23: {
        !            24:        if (!(frame->srr1 & PSL_PR)
        !            25:            && (frame->exc == EXC_TRC
        !            26:                || (frame->exc == EXC_PGM && (frame->srr1 & 0x20000))
        !            27:                || frame->exc == EXC_BPT)) {
        !            28:
        !            29:                bcopy(frame->fixreg, DDB_REGS->tf.fixreg,
        !            30:                        32 * sizeof(u_int32_t));
        !            31:                DDB_REGS->tf.srr0 = frame->srr0;
        !            32:                DDB_REGS->tf.srr1 = frame->srr1;
        !            33:
        !            34:                cnpollc(TRUE);
        !            35:                db_trap(T_BREAKPOINT, 0);
        !            36:                cnpollc(FALSE);
        !            37:
        !            38:                bcopy(DDB_REGS->tf.fixreg, frame->fixreg,
        !            39:                        32 * sizeof(u_int32_t));
        !            40:
        !            41:                return 1;
        !            42:        }
        !            43:        return 0;
        !            44: }

CVSweb