i386-stub and download-write-size

Andrew Cagney ac131313@cygnus.com
Wed Oct 25 23:34:00 GMT 2000


Wolfram Faul wrote:
> 
> Hallo,
> i am using i386-stub. To decrease the protocoll overhead I want to send
> as big as possible packets to gdb-stub.
> I do
> 
> (gdb)set download-write-size 400
> or something like that. The buffer in gdb-stub is big enough for more.
> But the biggest packet gdb sends ist 103 bytes. Why? Is there a #define
> in target remote to limit this value?

At a guess 103 is the size of the i386 G packet.  GDB is paranoid about
stubs that suffer buffer overruns so goes out of its way to treat the
stub nicely.  Consequently, in the default mode, GDB limits the write
packet size to something less than the targets G packet and (should the
target return a short G packet) even less again.

You'll need to also tweek 

(gdb) help set remote memory-write-packet-size 
Set the maximum number of bytes per memory-write packet.
Specify the number of bytes in a packet or 0 (zero) for the
default packet size.  The actual limit is further reduced
dependent on the target.  Specify ``fixed'' to disable the
further restriction and ``limit'' to enable that restriction

Try:

	set download-write-size 0
	set remote memory-write-packet-size fixed
	set remote memory-write-packet-size 400

	Andrew


More information about the Gdb mailing list