Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/i386/i386/locore.S,v retrieving revision 1.63 retrieving revision 1.64 diff -u -p -r1.63 -r1.64 --- src/sys/arch/i386/i386/locore.S 2008/01/13 11:03:04 1.63 +++ src/sys/arch/i386/i386/locore.S 2008/01/20 12:43:00 1.64 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.63 2008/01/13 11:03:04 bouyer Exp $ */ +/* $NetBSD: locore.S,v 1.64 2008/01/20 12:43:00 skrll Exp $ */ /* * Copyright-o-rama! @@ -141,7 +141,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.63 2008/01/13 11:03:04 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.64 2008/01/20 12:43:00 skrll Exp $"); #include "opt_compat_oldboot.h" #include "opt_ddb.h" @@ -880,6 +880,24 @@ ENTRY(longjmp) movl $1,%eax # return 1 ret +ENTRY(dumpsys) + # mimic cpu_switchto() for postmortem debugging. + + # build a fake switch frame. + pushl %ebx + pushl %esi + pushl %edi + + # save a context. + movl $dumppcb,%eax + movl %esp,PCB_ESP(%eax) + movl %ebp,PCB_EBP(%eax) + + call _C_LABEL(dodumpsys) + + addl $(3*4), %esp # sizeof(switchframe) - sizeof(%eip) + ret + /* * struct lwp *cpu_switchto(struct lwp *oldlwp, struct newlwp, * bool returning)