summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@openbsd.org>1996-10-21 05:37:12 +0000
committerimp <imp@openbsd.org>1996-10-21 05:37:12 +0000
commit486de82d22716e81abf2b3672af286bf7fddf5ff (patch)
treec4ef42054d4668452b3d2ab199ccb5bb7db21878
parentrandom is stock (diff)
downloadwireguard-openbsd-486de82d22716e81abf2b3672af286bf7fddf5ff.tar.xz
wireguard-openbsd-486de82d22716e81abf2b3672af286bf7fddf5ff.zip
Added 'S' for Stack tracebacks. There are usually 3 items on the
stack before the routine that caused you to get into the debugger (due to the calls to stacktrace, actually). However, other than that garbage on the top of the stack, this has proven to be useful for me in tracking down strange things. While it might be better to get mdbstacktrace working (since it looks like it wants to be more complete), this gets functionality right away. Hope people find it useful.
-rw-r--r--sys/arch/arc/arc/minidebug.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/arc/arc/minidebug.c b/sys/arch/arc/arc/minidebug.c
index c1babc64a88..4de8b212038 100644
--- a/sys/arch/arc/arc/minidebug.c
+++ b/sys/arch/arc/arc/minidebug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: minidebug.c,v 1.2 1996/08/26 11:11:55 pefo Exp $ */
+/* $OpenBSD: minidebug.c,v 1.3 1996/10/21 05:37:12 imp Exp $ */
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)kadb.c 8.1 (Berkeley) 6/10/93
- * $Id: minidebug.c,v 1.2 1996/08/26 11:11:55 pefo Exp $
+ * $Id: minidebug.c,v 1.3 1996/10/21 05:37:12 imp Exp $
*/
/*
@@ -408,7 +408,10 @@ static int ssandrun; /* Single step and run flag (when cont at brk) */
break_insert();
}
return(TRUE);
-
+ case 'S':
+ printf("Stack traceback:\n");
+ stacktrace();
+ return(TRUE);
case 's':
set_break(mdbpcb.pcb_regs[PC] + 8);
return(TRUE);