From b188ee226945efdf5f729ac34773fb91bf237399 Mon Sep 17 00:00:00 2001 From: Peter Grehan Date: Mon, 12 Jul 2004 22:26:20 +0000 Subject: [PATCH] Bring into KDB new order. --- sys/powerpc/aim/trap.c | 15 ++++++--------- sys/powerpc/powerpc/trap.c | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c index 2738c5737df1..621f187a24ba 100644 --- a/sys/powerpc/aim/trap.c +++ b/sys/powerpc/aim/trap.c @@ -34,10 +34,10 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ddb.h" #include "opt_ktrace.h" #include +#include #include #include #include @@ -73,12 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - -#ifndef MULTIPROCESSOR -extern int intr_depth; -#endif - void trap(struct trapframe *); static void trap_fatal(struct trapframe *frame); @@ -99,6 +93,8 @@ int badaddr_read(void *, size_t, int *); extern char *syscallnames[]; +extern int debugger_on_panic; /* XXX */ + struct powerpc_exception { u_int vector; char *name; @@ -269,8 +265,9 @@ trap_fatal(struct trapframe *frame) { printtrap(frame->exc, frame, 1, (frame->srr1 & PSL_PR)); -#ifdef DDB - if ((debugger_on_panic || db_active) && kdb_trap(frame->exc, frame)) +#ifdef KDB + if ((debugger_on_panic || kdb_active) && + kdb_trap(frame->exc, 0, frame)) return; #endif panic("%s trap", trapname(frame->exc)); diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index 2738c5737df1..621f187a24ba 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -34,10 +34,10 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ddb.h" #include "opt_ktrace.h" #include +#include #include #include #include @@ -73,12 +73,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - -#ifndef MULTIPROCESSOR -extern int intr_depth; -#endif - void trap(struct trapframe *); static void trap_fatal(struct trapframe *frame); @@ -99,6 +93,8 @@ int badaddr_read(void *, size_t, int *); extern char *syscallnames[]; +extern int debugger_on_panic; /* XXX */ + struct powerpc_exception { u_int vector; char *name; @@ -269,8 +265,9 @@ trap_fatal(struct trapframe *frame) { printtrap(frame->exc, frame, 1, (frame->srr1 & PSL_PR)); -#ifdef DDB - if ((debugger_on_panic || db_active) && kdb_trap(frame->exc, frame)) +#ifdef KDB + if ((debugger_on_panic || kdb_active) && + kdb_trap(frame->exc, 0, frame)) return; #endif panic("%s trap", trapname(frame->exc));