From 0d8bb06961b4d7158ded41d841b45d893b713361 Mon Sep 17 00:00:00 2001 From: bde Date: Wed, 30 Jan 2002 18:51:24 +0000 Subject: 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. --- sys/amd64/amd64/amd64-gdbstub.c | 13 +++---------- sys/i386/i386/i386-gdbstub.c | 13 +++---------- 2 files changed, 6 insertions(+), 20 deletions(-) (limited to 'sys') 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 @@ -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; /* $#. */ - 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 @@ -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; /* $#. */ - 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); -- cgit v1.1