[PATCH 3/3] Remove target_read_live_memory
Pedro Alves
palves@redhat.com
Fri Mar 21 12:01:00 GMT 2014
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
More information about the Gdb-patches
mailing list