> Hello, > > This patch adds target read/write partial methods. > > It's almost ready for prime time. I want to first see through some other target cleanups namely: > + /* FIXME: cagney/2003-10-15: This code should walk down the target > + stack looking for a stratum that supports the mechanism. > + Unfortunatly, there isn't a per-target-stack chain to walk round. > + Catch-22. */ > and a s/target_ops/target/ transformation. > > Note that it includes: > + /* Transfer up-to LEN bytes of memory starting at OFFSET. */ > + TARGET_OBJECT_MEMORY > I'm going to need that when implementing a per-target CONVERT_FROM_FUNC_PTR_ADDR. The attached is what I've ended up committing. I didn't get to the s/target_ops/???/ transformation, but did get to the target stack this code needed. Now for some code that really uses it ... Andrew > 2003-10-15 Andrew Cagney > > * target.h (struct target_ops): Add "to_read_partial" and > "to_write_partial", delete "to_query". > (target_read_partial, target_write_partial): Declare. > (target_read, target_write): Declare. > (target_query): Delete macro. > * target.c (target_read_partial): New function. > (target_write_partial, target_read, target_write): New function. > (update_current_target): Inherit "to_read_partial" and > "to_write_partial" instead of "to_query". > (debug_to_partial_read, debug_to_partial_write): Replace > "debug_to_query". > (setup_target_debug): Set "to_read_partial" and "to_write_partial" > instead of "to_query". > * remote.c (remote_read_partial): Replace "remote_query". > (init_remote_ops): Set "to_read_partial" instead of "to_query". > (init_remote_async_ops): Ditto. > * kod.c (gdb_kod_query): Make "bufsize" a LONGEST. Use > "target_read_partial" instead of "target_query". > * avr-tdep.c (avr_io_reg_read_command): Make "bufsize" a LONGEST. > Use "target_read_partial" instead of "target_query".