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 v9 21/29] record-btrace: provide xfer_partial target method


On 12/20/2013 03:55 PM, Pedro Alves wrote:
> +		/* Check if the section we found is readonly.  */
> +		if ((bfd_get_section_flags (section->the_bfd_section->owner,
> +					    section->the_bfd_section)
> +		     & SEC_READONLY) != 0)
> +		  {
> +		    /* Truncate the request to fit into this section.  */
> +		    len = min (len, section->endaddr - offset);
> +		    break;
> 
> ... here, this should return TARGET_XFER_E_IO rather than break and
> falling through to the code that defers to the target beneath, as the
> caller will already do that for memory transfers.

Ah, no, ignore that.  You need to truncate len, so it wouldn't work
correctly, of course.  Silly me.

-- 
Pedro Alves


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