=== target.c ================================================================== --- target.c (revision 16) +++ target.c (revision 18) @@ -1359,30 +1359,7 @@ return target_xfer_partial (ops, object, annex, NULL, buf, offset, len); } -/* Wrappers to perform the full transfer. */ LONGEST -target_read (struct target_ops *ops, - enum target_object object, - const char *annex, gdb_byte *buf, - ULONGEST offset, LONGEST len) -{ - LONGEST xfered = 0; - while (xfered < len) - { - LONGEST xfer = target_read_partial (ops, object, annex, - (gdb_byte *) buf + xfered, - offset + xfered, len - xfered); - /* Call an observer, notifying them of the xfer progress? */ - if (xfer <= 0) - /* Call memory_error? */ - return -1; - xfered += xfer; - QUIT; - } - return len; -} - -LONGEST target_write (struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, @@ -1404,25 +1381,13 @@ return len; } -/* Memory transfer methods. */ - -void -get_target_memory (struct target_ops *ops, CORE_ADDR addr, gdb_byte *buf, - LONGEST len) -{ - if (target_read (ops, TARGET_OBJECT_MEMORY, NULL, buf, addr, len) - != len) - memory_error (EIO, addr); -} - ULONGEST -get_target_memory_unsigned (struct target_ops *ops, - CORE_ADDR addr, int len) +get_target_memory_unsigned (CORE_ADDR addr, int len) { gdb_byte buf[sizeof (ULONGEST)]; gdb_assert (len <= sizeof (buf)); - get_target_memory (ops, addr, buf, len); + target_read_memory (addr, buf, len); return extract_unsigned_integer (buf, len); } === target.h ================================================================== --- target.h (revision 16) +++ target.h (revision 18) @@ -247,27 +247,19 @@ ULONGEST offset, LONGEST len); /* Wrappers to perform the full transfer. */ -extern LONGEST target_read (struct target_ops *ops, - enum target_object object, - const char *annex, gdb_byte *buf, - ULONGEST offset, LONGEST len); extern LONGEST target_write (struct target_ops *ops, enum target_object object, const char *annex, const gdb_byte *buf, ULONGEST offset, LONGEST len); -/* Wrappers to target read/write that perform memory transfers. They - throw an error if the memory transfer fails. +/* Read an unsigned value of LEN bytes from ADDR. + Endianess differences between host and target are handled automatically. - NOTE: cagney/2003-10-23: The naming schema is lifted from - "frame.h". The parameter order is lifted from get_frame_memory, - which in turn lifted it from read_memory. */ + Throws an error is unsuccessfull. -extern void get_target_memory (struct target_ops *ops, CORE_ADDR addr, - gdb_byte *buf, LONGEST len); -extern ULONGEST get_target_memory_unsigned (struct target_ops *ops, - CORE_ADDR addr, int len); +*/ +extern ULONGEST get_target_memory_unsigned (CORE_ADDR addr, int len); /* If certain kinds of activity happen, target_wait should perform