This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] 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" <gdb-patches at sourceware dot org>, "qiyaoltc at gmail dot com" <qiyaoltc at gmail dot com>
- Date: Thu, 30 Jun 2016 19:40:10 +0100
- Subject: Re: [PATCH v2] Optimize memory_xfer_partial for remote
- Authentication-results: sourceware.org; auth=none
- References: <1467058970-62136-1-git-send-email-donb at codesourcery dot com> <6e4787d9-f6d5-641e-ffd5-1dd255806b3b at redhat dot com> <57755AC2 dot 9090008 at codesourcery dot com>
On 06/30/2016 06:45 PM, Don Breazeal wrote:
> That makes sense to me. If it returns ULONGEST_MAX then the rest of the
> patch can stay as-is. Something like this?
>
> +/* The default implementation for the to_get_memory_xfer_limit method.
> + The default limit is essentially "no limit". */
> +
> +static ULONGEST
> +default_get_memory_xfer_limit (struct target_ops *self)
> +{
> + return ULONGEST_MAX;
> +}
Agreed. Though if you use TARGET_DEFAULT_RETURN, then you don't
even need that function:
/* Return the limit on the size of any single memory transfer
for the target. The default limit is essentially "no limit". */
ULONGEST (*to_get_memory_xfer_limit) (struct target_ops *)
TARGET_DEFAULT_RETURN (ULONGEST_MAX);
Thanks,
Pedro Alves