summaryrefslogtreecommitdiffstats
path: root/sys/i386
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/i386
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/i386')
-rw-r--r--sys/i386/include/db_machdep.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/include/db_machdep.h b/sys/i386/include/db_machdep.h
index 8145d3a..310c43b 100644
--- a/sys/i386/include/db_machdep.h
+++ b/sys/i386/include/db_machdep.h
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*
- * $Id: db_machdep.h,v 1.3 1993/11/07 17:42:50 wollman Exp $
+ * $Id: db_machdep.h,v 1.4 1994/09/08 11:49:04 bde Exp $
*/
#ifndef _I386_DB_MACHDEP_H_
@@ -55,7 +55,7 @@ typedef struct i386_saved_state db_regs_t;
extern db_regs_t ddb_regs; /* register state */
#define DDB_REGS (&ddb_regs)
-#define PC_REGS(regs) ((db_addr_t)(regs)->tf_eip)
+#define PC_REGS(regs) ((regs)->tf_cs == 0x08 ? (db_addr_t)(regs)->tf_eip : 0)
#define BKPT_INST 0xcc /* breakpoint instruction */
#define BKPT_SIZE (1) /* size of breakpoint inst */
OpenPOWER on IntegriCloud