This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: i386-stub and download-write-size
- To: Wolfram Faul <Wolfram dot Faul at eikon dot tum dot de>
- Subject: Re: i386-stub and download-write-size
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 26 Oct 2000 17:28:42 +1100
- Cc: gdb at sources dot redhat dot com
- References: <39F6DFA2.C8070ADF@eikon.tum.de>
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