This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Optimize memory_xfer_partial for remote
- From: Pedro Alves <palves at redhat dot com>
- To: Don Breazeal <donb at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Mon, 20 Jun 2016 20:25:47 +0100
- Subject: Re: [PATCH] Optimize memory_xfer_partial for remote
- Authentication-results: sourceware.org; auth=none
- References: <1464980562-24184-1-git-send-email-donb at codesourcery dot com>
On 06/03/2016 08:02 PM, Don Breazeal wrote:
> I considered making target_set_memory_xfer_limit a function in the target
> vector, but concluded that was overkill. In this patch it is an external
> function in target.c.
Sorry, but that doesn't make sense. If in the same session you
switch to another target (e.g., core or native debugging), you'll
continue using the limit set up by the previous remote connection.
There's also an effort to teach gdb about connecting to
multiple remote targets at the same time. A global like this
would need to be adjusted to per-connection anyway.
So seems to be we should have a real target_get_memory_xfer_limit()
(or some such) target method.
>
> + /* Set the cap on memory transfer requests to our packet size. */
> + target_set_memory_xfer_limit (get_remote_packet_size ());
Shouldn't this be based on get_memory_write_packet_size() instead?
Thanks,
Pedro Alves