This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdbserver corrupts binary data in remote protocol


On Thu, Dec 06, 2007 at 11:05:57PM +0900, Mick Davis wrote:
> 
> 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.

How embarrassing.  I thought I'd fixed this before so I went to check:
it only happens when not reading from the cached buffer, since I fixed
the other occurance and missed this one.  Most packets fit in a single
buffer when using TCP, and the first character in the packet never has
its high bit set.

> 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
> 
> 	* gdbserver/remote-utils.c (readchar): Allow binary data in received messages

I've checked this in for you.  Thanks!

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]