summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-01-30 18:51:24 +0000
committerbde <bde@FreeBSD.org>2002-01-30 18:51:24 +0000
commit0d8bb06961b4d7158ded41d841b45d893b713361 (patch)
treeabebe0c65b869b5c4fae9095090216c99d4500fe /sys
parent83b7c4d30a3f9613ef1f324e0184f7eb121b9139 (diff)
downloadFreeBSD-src-0d8bb06961b4d7158ded41d841b45d893b713361.zip
FreeBSD-src-0d8bb06961b4d7158ded41d841b45d893b713361.tar.gz
Backed out the main part of revs.1.14-16. Don't disable interrupts in
the packet transfer routines, since rev.1.468 of machdep.c does this better. I'm surprised that disabling interrupts helped much. Disabling them in the packet receive routine is too late. Fixed some minor style bugs in rev.1.14.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/amd64-gdbstub.c13
-rw-r--r--sys/i386/i386/i386-gdbstub.c13
2 files changed, 6 insertions, 20 deletions
diff --git a/sys/amd64/amd64/amd64-gdbstub.c b/sys/amd64/amd64/amd64-gdbstub.c
index 2e6464d..fd283bd 100644
--- a/sys/amd64/amd64/amd64-gdbstub.c
+++ b/sys/amd64/amd64/amd64-gdbstub.c
@@ -91,6 +91,7 @@
* $m0,10#2a +$00010203040506070809101112131415#42
*
****************************************************************************/
+
/* $FreeBSD$ */
#include <sys/param.h>
@@ -179,10 +180,7 @@ getpacket (char *buffer)
int i;
int count;
unsigned char ch;
- int s;
- s = read_eflags();
- disable_intr();
do
{
/* wait around for the start character, ignore all other characters */
@@ -233,7 +231,6 @@ getpacket (char *buffer)
}
}
while (checksum != xmitcsum);
- write_eflags(s);
}
/* send the packet in buffer. */
@@ -244,11 +241,8 @@ putpacket (char *buffer)
unsigned char checksum;
int count;
unsigned char ch;
- int s;
/* $<packet info>#<checksum>. */
- s = read_eflags();
- disable_intr();
do
{
/*
@@ -280,7 +274,6 @@ putpacket (char *buffer)
putDebugChar (hexchars[checksum & 0xf]);
}
while ((getDebugChar () & 0x7f) != '+');
- write_eflags(s);
}
static char remcomInBuffer[BUFMAX];
@@ -494,8 +487,8 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
while (1)
{
- if (gdbdev == NODEV) /* somebody's removed it */
- return 1; /* get out of here */
+ if (gdbdev == NODEV)
+ return 1; /* somebody has removed the gdb device */
remcomOutBuffer[0] = 0;
getpacket (remcomInBuffer);
diff --git a/sys/i386/i386/i386-gdbstub.c b/sys/i386/i386/i386-gdbstub.c
index 2e6464d..fd283bd 100644
--- a/sys/i386/i386/i386-gdbstub.c
+++ b/sys/i386/i386/i386-gdbstub.c
@@ -91,6 +91,7 @@
* $m0,10#2a +$00010203040506070809101112131415#42
*
****************************************************************************/
+
/* $FreeBSD$ */
#include <sys/param.h>
@@ -179,10 +180,7 @@ getpacket (char *buffer)
int i;
int count;
unsigned char ch;
- int s;
- s = read_eflags();
- disable_intr();
do
{
/* wait around for the start character, ignore all other characters */
@@ -233,7 +231,6 @@ getpacket (char *buffer)
}
}
while (checksum != xmitcsum);
- write_eflags(s);
}
/* send the packet in buffer. */
@@ -244,11 +241,8 @@ putpacket (char *buffer)
unsigned char checksum;
int count;
unsigned char ch;
- int s;
/* $<packet info>#<checksum>. */
- s = read_eflags();
- disable_intr();
do
{
/*
@@ -280,7 +274,6 @@ putpacket (char *buffer)
putDebugChar (hexchars[checksum & 0xf]);
}
while ((getDebugChar () & 0x7f) != '+');
- write_eflags(s);
}
static char remcomInBuffer[BUFMAX];
@@ -494,8 +487,8 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
while (1)
{
- if (gdbdev == NODEV) /* somebody's removed it */
- return 1; /* get out of here */
+ if (gdbdev == NODEV)
+ return 1; /* somebody has removed the gdb device */
remcomOutBuffer[0] = 0;
getpacket (remcomInBuffer);
OpenPOWER on IntegriCloud