This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: RFA: PACKET_OVERHEAD constant added to remote.c
Kevin Buettner wrote:
>
> On Nov 16, 1:20pm, Andrew Cagney wrote:
>
> > > As far as remote_write_bytes() or remote_read_bytes() are concerned,
> > > they get their packet sizes by calling get_memory_write_packet_size()
> > > or get_memory_read_packet_size() which in turn determine the size by
> > > calling get_memory_packet_size(). It is the latter function which
> > > was returning too large a value. It is also in this function where
> > > I chose to make an adjustment:
> >
> > Yes. I'm just trying to understand if this is a recently introduced bug
> > (by me) or has always been in there. (In particular prior to the change
> > to remote.c below).
>
> Unclear. I was able to use an x86 linux gdbserver with gdb prior to
> your change below (without seeing the buffer overflow problem). I
> don't whether it was your change which caused the breakage or something
> else.
It is highly likely :-(
> Let me know if you'd like me to pursue this; I could do an update
> to Nov 3 and see if the problem still exists...
If you can? Otherwize I'll try to find a linux box - I should probably
look at the details.
FYI, I suspect that rather than chop down the packet size by 32 bytes,
it will be better to figure out what went wrong and fix that - 32 bytes
less in a packet is a significant reduction.
Andrew