diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-07-23 16:01:09 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-07-23 16:01:09 +0000 |
commit | 3567cc8d06d1b14cf6a245c03ca24c0e7b37e8af (patch) | |
tree | 553b60bbbfcb12a79e33d80986eb083dd6ec9b45 /sys/arch | |
parent | 972a91a7c771fd6abb5e1ccdfa45e666e90537a3 (diff) |
Enter DDB directly when we encounter an unhandled trap such that we
can inspect the state corresponding to that trap.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/powerpc64/powerpc64/trap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/powerpc64/powerpc64/trap.c b/sys/arch/powerpc64/powerpc64/trap.c index 4cda5ae9b2e..08134fc21c1 100644 --- a/sys/arch/powerpc64/powerpc64/trap.c +++ b/sys/arch/powerpc64/powerpc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.33 2020/07/23 15:09:09 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.34 2020/07/23 16:01:08 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> @@ -32,6 +32,7 @@ #ifdef DDB #include <machine/db_machdep.h> +#include <ddb/db_output.h> #endif void decr_intr(struct trapframe *); /* clock.c */ @@ -294,6 +295,11 @@ trap(struct trapframe *frame) default: fatal: +#ifdef DDB + db_printf("trap type %x srr1 %lx at %lx lr %lx\n", + type, frame->srr1, frame->srr0, frame->lr); + db_ktrap(0, frame); +#endif panic("trap type %x srr1 %lx at %lx lr %lx", type, frame->srr1, frame->srr0, frame->lr); } |