aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-hms.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1994-09-15 01:29:07 +0000
committerSteve Chamberlain <sac@cygnus>1994-09-15 01:29:07 +0000
commita87594a562ad2d066f94061e1330c223785b51a2 (patch)
treedac928e43e2cc66ed6ed7dda893081499b1e37bc /gdb/remote-hms.c
parent2b9fbee414f8a4220d298fef412215db2760a2b5 (diff)
downloadgdb-a87594a562ad2d066f94061e1330c223785b51a2.zip
gdb-a87594a562ad2d066f94061e1330c223785b51a2.tar.gz
gdb-a87594a562ad2d066f94061e1330c223785b51a2.tar.bz2
Wed Sep 14 18:18:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
* remote-hms.c (hms_read_inferior_memory): Cope when target sends both \r and \n.
Diffstat (limited to 'gdb/remote-hms.c')
-rw-r--r--gdb/remote-hms.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c
index 38e85f2..a553418 100644
--- a/gdb/remote-hms.c
+++ b/gdb/remote-hms.c
@@ -1358,10 +1358,14 @@ hms_read_inferior_memory (memaddr, myaddr, len)
char byte[16];
buffer[0] = readchar ();
+ while (buffer[0] == '\r'
+ || buffer[0] == '\n')
+ buffer[0] = readchar ();
+
if (buffer[0] == 'M')
break;
- for (i = 1; i < 60; i++) {
+ for (i = 1; i < 50; i++) {
buffer[i] = readchar ();
}
/* sometimes we loose characters in the ascii representation of the
@@ -1369,7 +1373,7 @@ hms_read_inferior_memory (memaddr, myaddr, len)
i = readchar();
while (i != '\n' && i != '\r')
i = readchar();
-
+
/* Now parse the line */
addr = gethex (4, buffer, &ok);