This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Remote protocol tune up...
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: Remote protocol tune up...
- From: jtc at redback dot com (J.T. Conklin)
- Date: 14 Oct 1999 17:43:19 -0700
- Cc: GDB Discussion <gdb at sourceware dot cygnus dot com>
- References: <3805B369.464A948C@cygnus.com>
- Reply-To: jtc at redback dot com
>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
Andrew> * generic_load()
Andrew> (Ignoring the bug fixes) This function will be changed to use
Andrew> target_write_memory_partial(). This allows the code to
Andrew> re-charge each transfer attempt to the maximum allowable
Andrew> (according to the chunk size). The GENERIC_LOAD_CHUNK will
Andrew> also be replaced by a run-time variable that even allows
Andrew> chunking to be disabled. I'll also bump GENERIC_LOAD_CHUNK up
Andrew> to 512 (2*512 + header/footer <= sizeof (udp packet)), any
Andrew> bids for 1024?
Umm, just how are you computing sizeof(udp packet)? I count 20 bytes
for a IP packet without any options plus 8 for the UDP header for a
zero length UDP packet. Not that this matters much...
A logical refinement of your proposal would be to do target write size
discovery. Instead of having generic_load() attempt to write N bytes,
target_write_memory() return an indication that M bytes were actually
written, 're-chargeing' the transfer by adding N-M bytes of data, and
then attempting to write an N byte buffer again; I believe it should
drop back to using an M byte write.
--jtc
--
J.T. Conklin
RedBack Networks