diff options
author | Gary Benson <gbenson@redhat.com> | 2015-08-19 13:53:24 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2015-08-19 13:53:24 +0100 |
commit | 45face3ba147a4c5f4f7e09cf10c95986b915002 (patch) | |
tree | d0ef977ff3350dfce9501aa988e80ad47afaa6ea /gas/config | |
parent | 64d94ba01a4f56ac10bb277e66bb00d82bd97f10 (diff) | |
download | gdb-45face3ba147a4c5f4f7e09cf10c95986b915002.zip gdb-45face3ba147a4c5f4f7e09cf10c95986b915002.tar.gz gdb-45face3ba147a4c5f4f7e09cf10c95986b915002.tar.bz2 |
Prelimit number of bytes to read in "vFile:pread:"
While handling "vFile:pread:" packets, gdbserver would read the
number of bytes requested regardless of whether this would fit
into the reply packet. gdbserver would then return a packet's
worth of data and discard the remainder. When accessing large
binaries GDB (via BFD) routinely makes large "vFile:pread:"
requests, resulting in gdbserver allocating large unnecessary
buffers and reading some portions of the file many times over.
This commit causes gdbserver to limit the number of bytes to be
read to a sensible maximum prior to allocating buffers and reading
data.
gdb/gdbserver/ChangeLog:
* hostio.c (handle_pread): Do not attempt to read more data
than hostio_reply_with_data can fit in a packet.
Diffstat (limited to 'gas/config')
0 files changed, 0 insertions, 0 deletions