[gnu.gdb.bug] bugs in V2.5 and V2.8 of gdb

chrisb@tektronix.tek.com (Chris Benenati) (11/22/88)

Bugs, I believe, in remote.c, in both versions 2.5 and 2.8 of GDB:

In remote_store_registers():

	  for (i = 0; i < REGISTER_BYTES; i++)
	    {
	      *p++ = (regs[i] > 4) & 0xf;  <------ should be ">>" not ">"
	      *p++ = regs[i] & 0xf;
	    }
	
Same thing in remote_write_bytes()

In remote_read_bytes():

	  for (i = 0; i < REGISTER_BYTES; i++)	<---------should be "i < len"
	    {
	      if (p[0] == 0 || p[1] == 0)
		error ("Remote reply is too short: %s", buf);
	      myaddr[i] = fromhex (p[0]) * 16 + fromhex (p[1]);
	      p += 2;
	    }