gdbserver corrupts binary data in remote protocol

Mick Davis mickd@goanna.iinet.net.au
Thu Dec 6 14:22:00 GMT 2007


I believe I've found a small bug when using the gdbserver to write into 
target memory.

If the command received by the server uses a binary encoded data part, 
the remote protocol will clear the most significant bit of each byte. 
This may result in a CRC failure.  The fix is to the readchar function, 
which applies a bit mask to the returned byte.

Thanks


-- 

Mick Davis
Goanna Technologies Pty Ltd

ChangeLog entry:

2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>

	* gdbserver/remote-utils.c (readchar): Allow binary data in received 
messages


-------------- next part --------------
A non-text attachment was scrubbed...
Name: remote_binary_packet_fix.diff
Type: text/x-patch
Size: 675 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20071206/6948f24a/attachment.bin>


More information about the Gdb-patches mailing list