From: Stan Shebs Date: Tue, 15 Nov 1994 22:29:48 +0000 (+0000) Subject: * i386-stub.c, m68k-stub.c, sparc-stub.c, sparcl-stub.c: Mask out X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d4838fe0dcca00186f623dce94352572ec05dae;p=binutils-gdb.git * i386-stub.c, m68k-stub.c, sparc-stub.c, sparcl-stub.c: Mask out the top bit returned by getDebugChar. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c39a47b6c13..b71aaa07766 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 15 14:25:47 1994 Stan Shebs (shebs@andros.cygnus.com) + + * i386-stub.c, m68k-stub.c, sparc-stub.c, sparcl-stub.c: Mask out + the top bit returned by getDebugChar. + Tue Nov 15 01:03:56 1994 Rob Savoye (rob@slipknot.cygnus.com) * op50-rom.c, w89k-rom.c, monitor.c: Modify to usr two variables diff --git a/gdb/sparc-stub.c b/gdb/sparc-stub.c index d2e7b438a8d..135f51e483c 100644 --- a/gdb/sparc-stub.c +++ b/gdb/sparc-stub.c @@ -298,7 +298,7 @@ getpacket(buffer) do { /* wait around for the start character, ignore all other characters */ - while ((ch = getDebugChar()) != '$') ; + while ((ch = (getDebugChar() & 0x7f)) != '$') ; checksum = 0; xmitcsum = -1; @@ -308,7 +308,7 @@ getpacket(buffer) /* now, read until a # or end of buffer is found */ while (count < BUFMAX) { - ch = getDebugChar(); + ch = getDebugChar() & 0x7f; if (ch == '#') break; checksum = checksum + ch; @@ -323,8 +323,8 @@ getpacket(buffer) if (ch == '#') { - xmitcsum = hex(getDebugChar()) << 4; - xmitcsum |= hex(getDebugChar()); + xmitcsum = hex(getDebugChar() & 0x7f) << 4; + xmitcsum |= hex(getDebugChar() & 0x7f); #if 0 /* Humans shouldn't have to figure out checksums to type to it. */ putDebugChar ('+'); @@ -381,7 +381,7 @@ putpacket(buffer) putDebugChar(hexchars[checksum & 0xf]); } - while (getDebugChar() != '+'); + while ((getDebugChar() & 0x7f) != '+'); } static char remcomInBuffer[BUFMAX]; diff --git a/gdb/sparcl-stub.c b/gdb/sparcl-stub.c index ddcf2468781..fa63ef13fd4 100644 --- a/gdb/sparcl-stub.c +++ b/gdb/sparcl-stub.c @@ -375,7 +375,7 @@ getpacket(buffer) do { /* wait around for the start character, ignore all other characters */ - while ((ch = getDebugChar()) != '$') ; + while ((ch = (getDebugChar() & 0x7f)) != '$') ; checksum = 0; xmitcsum = -1; @@ -385,7 +385,7 @@ getpacket(buffer) /* now, read until a # or end of buffer is found */ while (count < BUFMAX) { - ch = getDebugChar(); + ch = getDebugChar() & 0x7f; if (ch == '#') break; checksum = checksum + ch; @@ -400,8 +400,8 @@ getpacket(buffer) if (ch == '#') { - xmitcsum = hex(getDebugChar()) << 4; - xmitcsum |= hex(getDebugChar()); + xmitcsum = hex(getDebugChar() & 0x7f) << 4; + xmitcsum |= hex(getDebugChar() & 0x7f); #if 0 /* Humans shouldn't have to figure out checksums to type to it. */ putDebugChar ('+'); @@ -458,7 +458,7 @@ putpacket(buffer) putDebugChar(hexchars[checksum & 0xf]); } - while (getDebugChar() != '+'); + while ((getDebugChar() & 0x7f) != '+'); } static char remcomInBuffer[BUFMAX];