From: Daniel Jacobowitz <drow@false.org>
To: Mick Davis <mickd@goanna.iinet.net.au>
Cc: gdb-patches@sourceware.org
Subject: Re: gdbserver corrupts binary data in remote protocol
Date: Thu, 06 Dec 2007 16:27:00 -0000 [thread overview]
Message-ID: <20071206142205.GA28845@caradoc.them.org> (raw)
In-Reply-To: <475801C5.2090809@goanna.iinet.net.au>
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
prev parent reply other threads:[~2007-12-06 14:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 14:22 Mick Davis
2007-12-06 16:27 ` Daniel Jacobowitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071206142205.GA28845@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=mickd@goanna.iinet.net.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox