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 3/3] Remove target_read_live_memory


On 03/11/2014 12:42 PM, Yao Qi wrote:
> As we move code on reading unavailable memory to target side, GDB core
> side doesn't need the "switching momentarily out of tfind mode" dance.
> The target remote knows how to read live memory (through remote_ops).
> 
> Remove set_traceframe_number and
> make_cleanup_restore_traceframe_number, since they are no longer used.

Awesome.  Thanks for doing this.

> -
> -/* Using the set of read-only target sections of OPS, read live
> -   read-only memory.  Note that the actual reads start from the
> -   top-most target again.
> +/* Using the set of read-only target sections of remote, read live
> +   read-only memory.
>  
>     For interface/parameters/return description see target.h,
>     to_xfer_partial.  */
>  
>  static enum target_xfer_status
> -memory_xfer_live_readonly_partial (struct target_ops *ops,
> -				   enum target_object object,
> -				   gdb_byte *readbuf, ULONGEST memaddr,
> +remote_xfer_live_readonly_partial (gdb_byte *readbuf, ULONGEST memaddr,
>  				   ULONGEST len, ULONGEST *xfered_len)
>  {
>    struct target_section *secp;
>    struct target_section_table *table;
> +  struct target_ops *ops = &remote_ops;

This reference to remote_ops must be removed, per my comment to patch 1.
IOW, OPS needs to stay.  (The intro comment should then still say "of
OPS".)

Otherwise looks good.

Thanks,
-- 
Pedro Alves


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