This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Optimize memory_xfer_partial for remote


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]