summaryrefslogtreecommitdiff
path: root/sys/amd64/amd64/db_interface.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-11-18 06:49:35 +0000
committerBruce Evans <bde@FreeBSD.org>1995-11-18 06:49:35 +0000
commit29b2d3a9dc36f3f655b382c40b2b85bc07f221a0 (patch)
treeb6402a43854160acd71de4f3c2f8f8524b0712ac /sys/amd64/amd64/db_interface.c
parent41e7c9b71d4642ee0be4db747941e7747b706494 (diff)
downloadsrc-test2-29b2d3a9dc36f3f655b382c40b2b85bc07f221a0.tar.gz
src-test2-29b2d3a9dc36f3f655b382c40b2b85bc07f221a0.zip
Notes
Diffstat (limited to 'sys/amd64/amd64/db_interface.c')
-rw-r--r--sys/amd64/amd64/db_interface.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c
index 8daa0a27aa32..2f458a8fc9c9 100644
--- a/sys/amd64/amd64/db_interface.c
+++ b/sys/amd64/amd64/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.13 1995/04/08 21:31:53 joerg Exp $
+ * $Id: db_interface.c,v 1.14 1995/05/30 07:59:22 rgrimes Exp $
*/
/*
@@ -81,9 +81,22 @@ kdb_trap(type, code, regs)
return(0);
#endif
- /* XXX: do not block forever while the console is in graphics mode */
- if(cons_unavail)
- return 0;
+ /*
+ * XXX try to do nothing if the console is in graphics mode.
+ * Handle trace traps (and hardware breakpoints...) by ignoring
+ * them except for forgetting about them. Return 0 for other
+ * traps to say that we haven't done anything. The trap handler
+ * will usually panic. We should handle breakpoint traps for
+ * our breakpoints by disarming our breakpoints and fixing up
+ * %eip.
+ */
+ if (cons_unavail) {
+ if (type = T_TRCTRAP) {
+ regs->tf_eflags &= ~PSL_T;
+ return (1);
+ }
+ return (0);
+ }
switch (type) {
case T_BPTFLT: /* breakpoint */
@@ -246,8 +259,12 @@ Debugger(msg)
{
static volatile u_char in_Debugger;
- /* XXX: do not block forever while the console is in graphics mode */
- if(cons_unavail)
+ /*
+ * XXX do nothing if the console is in graphics mode. This is
+ * OK if the call is for the debugger hotkey but not if the call
+ * is a weak form of panicing.
+ */
+ if (cons_unavail)
return;
if (!in_Debugger) {