summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-03-28 12:39:43 +0000
committerbde <bde@FreeBSD.org>1997-03-28 12:39:43 +0000
commitb0b8f0ac085b019d7d57e4ce4c8c30f7736d2810 (patch)
tree253fe1e3be186daa5298c0b835abaa2b3f7047dc /sys/ddb
parent2558d1ad635da469c5e629f9012399d8c81b99b7 (diff)
downloadFreeBSD-src-b0b8f0ac085b019d7d57e4ce4c8c30f7736d2810.zip
FreeBSD-src-b0b8f0ac085b019d7d57e4ce4c8c30f7736d2810.tar.gz
Added a setjmp() so that an initial pc that points to unmapped memory
isn't fatal. Backed out rev.1.6, which handled special cases of this.
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_trap.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c
index 913e5e6..5a9317c 100644
--- a/sys/ddb/db_trap.c
+++ b/sys/ddb/db_trap.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id$
+ * $Id: db_trap.c,v 1.11 1997/02/22 09:28:31 peter Exp $
*/
/*
@@ -43,6 +43,10 @@
#include <ddb/db_command.h>
#include <ddb/db_break.h>
+#include <setjmp.h>
+
+extern jmp_buf db_jmpbuf;
+
void
db_trap(type, code)
int type, code;
@@ -58,17 +62,15 @@ db_trap(type, code)
db_printf("After %d instructions (%d loads, %d stores),\n",
db_inst_count, db_load_count, db_store_count);
}
+ if (bkpt)
+ db_printf("Breakpoint at\t");
+ else if (watchpt)
+ db_printf("Watchpoint at\t");
+ else
+ db_printf("Stopped at\t");
db_dot = PC_REGS(DDB_REGS);
- if(db_dot) {
- if (bkpt)
- db_printf("Breakpoint at\t");
- else if (watchpt)
- db_printf("Watchpoint at\t");
- else
- db_printf("Stopped at\t");
-
+ if (setjmp(db_jmpbuf) == 0)
db_print_loc_and_inst(db_dot);
- }
db_command_loop();
}
OpenPOWER on IntegriCloud