* remote.c (read_frame): Calculate run length encoded checksum correctly.
* config/sh/stub.c: New file.
This commit is contained in:
parent
7f4b5f94dd
commit
284f4ee95b
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Aug 4 16:26:06 1994 Steve Chamberlain (sac@jonny.cygnus.com)
|
||||||
|
|
||||||
|
* remote.c (read_frame): Calculate run length encoded checksum correctly.
|
||||||
|
* config/sh/stub.c: New file.
|
||||||
|
|
||||||
Thu Aug 4 14:34:12 1994 Stu Grossman (grossman@cygnus.com)
|
Thu Aug 4 14:34:12 1994 Stu Grossman (grossman@cygnus.com)
|
||||||
|
|
||||||
* target.c (find_default_run_target): Make sure to_can_run is set
|
* target.c (find_default_run_target): Make sure to_can_run is set
|
||||||
|
|
12
gdb/remote.c
12
gdb/remote.c
|
@ -126,10 +126,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
remote target.
|
remote target.
|
||||||
|
|
||||||
Responses can be run-length encoded to save space. A '*' means that
|
Responses can be run-length encoded to save space. A '*' means that
|
||||||
the next two characters are hex digits giving a repeat count which
|
the next character is an ASCII encoding giving a repeat count which
|
||||||
stands for that many repititions of the character preceding the '*'.
|
stands for that many repititions of the character preceding the '*'.
|
||||||
Note that this means that responses cannot contain '*'. Example:
|
The encoding is n+29, yielding a printable character where n >=3
|
||||||
"0*03" means the same as "0000". */
|
(which is where rle starts to win). Don't use an n > 126.
|
||||||
|
|
||||||
|
So
|
||||||
|
"0* " means the same as "0000". */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -1254,6 +1257,7 @@ read_frame (buf)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case '*': /* Run length encoding */
|
case '*': /* Run length encoding */
|
||||||
|
csum += c;
|
||||||
c = readchar (remote_timeout);
|
c = readchar (remote_timeout);
|
||||||
csum += c;
|
csum += c;
|
||||||
c = c - ' ' + 3; /* Compute repeat count */
|
c = c - ' ' + 3; /* Compute repeat count */
|
||||||
|
@ -1269,8 +1273,8 @@ read_frame (buf)
|
||||||
printf_filtered ("Repeat count %d too large for buffer: ", c);
|
printf_filtered ("Repeat count %d too large for buffer: ", c);
|
||||||
puts_filtered (buf);
|
puts_filtered (buf);
|
||||||
puts_filtered ("\n");
|
puts_filtered ("\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (bp < buf + PBUFSIZ - 1)
|
if (bp < buf + PBUFSIZ - 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue