Make faulting in DDB continue back in the top-level command
loop properly.
This commit is contained in:
parent
2951cb8e99
commit
88f63e28d6
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_interface.c,v 1.30 2003/06/06 10:07:07 scw Exp $ */
|
||||
/* $NetBSD: db_interface.c,v 1.31 2003/07/09 20:14:14 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Scott K. Stevens
|
||||
@ -139,8 +139,8 @@ kdb_trap(int type, db_regs_t *regs)
|
||||
case -1: /* keyboard interrupt */
|
||||
break;
|
||||
default:
|
||||
db_printf("kernel: trap");
|
||||
if (db_recover != 0) {
|
||||
/* This will longjmp back into db_command_loop() */
|
||||
db_error("Faulted in DDB; continuing...\n");
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fault.c,v 1.30 2003/05/21 18:04:43 thorpej Exp $ */
|
||||
/* $NetBSD: fault.c,v 1.31 2003/07/09 20:14:15 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2003 Wasabi Systems, Inc.
|
||||
@ -82,7 +82,7 @@
|
||||
#include "opt_pmap_debug.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.30 2003/05/21 18:04:43 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.31 2003/07/09 20:14:15 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -411,7 +411,7 @@ we_re_toast:
|
||||
#if defined(DDB) || defined(KGDB)
|
||||
printf("Unhandled trap (frame = %p)\n", frame);
|
||||
report_abort(NULL, fault_status, fault_address, fault_pc);
|
||||
kdb_trap(-1, frame);
|
||||
kdb_trap(T_FAULT, frame);
|
||||
return;
|
||||
#else
|
||||
panic("Unhandled trap (frame = %p)", frame);
|
||||
@ -515,7 +515,7 @@ we_re_toast:
|
||||
#if defined(DDB) || defined(KGDB)
|
||||
printf("Non-emulated page fault with intr_depth > 0\n");
|
||||
report_abort(NULL, fault_status, fault_address, fault_pc);
|
||||
kdb_trap(-1, frame);
|
||||
kdb_trap(T_FAULT, frame);
|
||||
return;
|
||||
#else
|
||||
panic("Fault with intr_depth > 0");
|
||||
@ -658,7 +658,7 @@ prefetch_abort_handler(frame)
|
||||
if (current_intr_depth > 0) {
|
||||
#ifdef DDB
|
||||
printf("Non-emulated prefetch abort with intr_depth > 0\n");
|
||||
kdb_trap(-1, frame);
|
||||
kdb_trap(T_FAULT, frame);
|
||||
return;
|
||||
#else
|
||||
panic("Prefetch Abort with intr_depth > 0");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_machdep.h,v 1.7 2003/04/29 17:06:04 scw Exp $ */
|
||||
/* $NetBSD: db_machdep.h,v 1.8 2003/07/09 20:14:15 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Scott K Stevens
|
||||
@ -64,6 +64,7 @@ db_regs_t ddb_regs; /* register state */
|
||||
|
||||
/*#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->tf_pc -= BKPT_SIZE)*/
|
||||
|
||||
#define T_FAULT (0)
|
||||
#define T_BREAKPOINT (1)
|
||||
|
||||
#define IS_BREAKPOINT_TRAP(type, code) ((type) == T_BREAKPOINT)
|
||||
|
Loading…
Reference in New Issue
Block a user