[PATCH v2] Optimize memory_xfer_partial for remote

Pedro Alves palves@redhat.com
Thu Jun 30 18:40:00 GMT 2016


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



More information about the Gdb-patches mailing list