This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/3] Remove target_read_live_memory
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 21 Mar 2014 12:00:50 +0000
- Subject: Re: [PATCH 3/3] Remove target_read_live_memory
- Authentication-results: sourceware.org; auth=none
- References: <1394541731-27486-1-git-send-email-yao at codesourcery dot com> <1394541731-27486-3-git-send-email-yao at codesourcery dot com>
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