target: consider addressable unit size when reading/writing memory
If we are reading/writing from a memory object, the length represents
the number of "addresses" to read/write, so the addressable unit size
needs to be taken into account when allocating memory on gdb's side.
gdb/ChangeLog:
* target.c (target_read): Consider addressable unit size when
reading from a memory object.
(read_memory_robust): Same.
(read_whatever_is_readable): Same.
(target_write_with_progress): Consider addressable unit size
when writing to a memory object.
* target.h (target_read): Update documentation.
(target_write): Add documentation.