summaryrefslogtreecommitdiffstats
path: root/sys/ddb/db_trap.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-10-02 19:36:30 +0000
committerphk <phk@FreeBSD.org>1994-10-02 19:36:30 +0000
commit1f6d0ff1e22a737770562d1c7c12a0323eae461b (patch)
tree4b164dc10241f335bd040f1659f7978e95f52e5b /sys/ddb/db_trap.c
parenta7840d2aa8e9853c0f8915c6cc155f4b8b808e2f (diff)
downloadFreeBSD-src-1f6d0ff1e22a737770562d1c7c12a0323eae461b.zip
FreeBSD-src-1f6d0ff1e22a737770562d1c7c12a0323eae461b.tar.gz
Avoid ddb getting a panic if the code-segment isn't the usual one...
Diffstat (limited to 'sys/ddb/db_trap.c')
-rw-r--r--sys/ddb/db_trap.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/ddb/db_trap.c b/sys/ddb/db_trap.c
index 8d2941a..bc65ed9 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: db_trap.c,v 1.4 1994/08/13 03:49:24 wollman Exp $
+ * $Id: db_trap.c,v 1.5 1994/08/18 22:34:27 wollman Exp $
*/
/*
@@ -57,14 +57,17 @@ 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);
- db_print_loc_and_inst(db_dot);
+ if(db_dot) {
+ if (bkpt)
+ db_printf("Breakpoint at\t");
+ else if (watchpt)
+ db_printf("Watchpoint at\t");
+ else
+ db_printf("Stopped at\t");
+
+ db_print_loc_and_inst(db_dot);
+ }
db_command_loop();
}
OpenPOWER on IntegriCloud