summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-09-15 11:38:59 +0000
committerdg <dg@FreeBSD.org>1994-09-15 11:38:59 +0000
commit5d54a795fb1f624aff03bcb15d25a7182da56324 (patch)
tree2d42757f309073db15fdcaad82ea30849f23d616 /sys/i386
parentb01b790ba85403a20f8aa9080eeea7296c63c645 (diff)
downloadFreeBSD-src-5d54a795fb1f624aff03bcb15d25a7182da56324.zip
FreeBSD-src-5d54a795fb1f624aff03bcb15d25a7182da56324.tar.gz
Brought over from 1.1.5:
From Bruce Evans: Protect against reentering Debugger().
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/db_interface.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/i386/i386/db_interface.c b/sys/i386/i386/db_interface.c
index 9e48973..8f08cc3 100644
--- a/sys/i386/i386/db_interface.c
+++ b/sys/i386/i386/db_interface.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_interface.c,v 1.8 1994/08/13 03:49:36 wollman Exp $
+ * $Id: db_interface.c,v 1.9 1994/09/02 04:12:02 davidg Exp $
*/
/*
@@ -232,9 +232,24 @@ db_write_bytes(addr, size, data)
}
}
+/*
+ * XXX move this to machdep.c and allow it to be called iff any debugger is
+ * installed.
+ * XXX msg is not printed.
+ */
void
Debugger (msg)
const char *msg;
{
- asm ("int $3");
+ static volatile u_char in_Debugger;
+
+ if (!in_Debugger) {
+ in_Debugger = 1;
+#ifdef __GNUC__
+ asm("int $3");
+#else
+ int3();
+#endif
+ in_Debugger = 0;
+ }
}
OpenPOWER on IntegriCloud