summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-12-24 21:15:31 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-12-24 21:15:31 +0000
commit8df5236ae95a2e69cf7573ce4d2aa81f3f8e8ef7 (patch)
tree38d21ddeb6539eaf8c7cb041cebd01b6119911f0 /sys/arch
parentc697a5647423f8ef9b818e56b048a01605455c60 (diff)
Partially revert 1.46 and print more details when panicing at the end of
trap(). This is expected to reduce loss of hair. ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/alpha/trap.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index 7c322071c69..675a226cfe4 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.76 2014/11/16 12:30:52 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.77 2014/12/24 21:15:30 miod Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -132,10 +132,9 @@ struct device fpevent_use;
struct device fpevent_reuse;
#endif
-#ifdef DEBUG
-static void printtrap(const unsigned long, const unsigned long,
- const unsigned long, const unsigned long, struct trapframe *, int, int);
-#endif /* DEBUG */
+void printtrap(const unsigned long, const unsigned long, const unsigned long,
+ const unsigned long, struct trapframe *, int, int);
+
/*
* Initialize the trap vectors for the current processor.
*/
@@ -161,12 +160,10 @@ trap_init()
~(ALPHA_MCES_DSC|ALPHA_MCES_DPC));
}
-#ifdef DEBUG
-static void
-printtrap(a0, a1, a2, entry, framep, isfatal, user)
- const unsigned long a0, a1, a2, entry;
- struct trapframe *framep;
- int isfatal, user;
+void
+printtrap(const unsigned long a0, const unsigned long a1,
+ const unsigned long a2, const unsigned long entry, struct trapframe *framep,
+ int isfatal, int user)
{
char ubuf[64];
const char *entryname;
@@ -212,7 +209,6 @@ printtrap(a0, a1, a2, entry, framep, isfatal, user)
curproc->p_comm);
printf("\n");
}
-#endif /* DEBUG */
/*
* Trap is called from locore to handle most types of processor traps.
@@ -504,9 +500,7 @@ out:
return;
dopanic:
-#ifdef DEBUG
printtrap(a0, a1, a2, entry, framep, 1, user);
-#endif
/* XXX dump registers */
#if defined(DDB)