From a87594a562ad2d066f94061e1330c223785b51a2 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Thu, 15 Sep 1994 01:29:07 +0000 Subject: [PATCH] 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. --- gdb/ChangeLog | 5 +++++ gdb/remote-hms.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bdc5fad3aae..c39acaa5b78 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +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. + Wed Sep 14 17:14:57 1994 Stan Shebs (shebs@andros.cygnus.com) * remote-mips.c (mips_error): Place NORETURN macro correctly. diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c index 38e85f257af..a553418cb7f 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); -- 2.30.2