]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
target: consider addressable unit size when reading/writing memory
authorSimon Marchi <simon.marchi@ericsson.com>
Fri, 12 Jun 2015 21:02:44 +0000 (17:02 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 12 Jun 2015 21:03:19 +0000 (17:03 -0400)
commitd309493c38fcef624f6f85aee4aa37f4f9e3e62a
treeba4610e81e6553b93f5d75bd9b54962b421b2acf
parent3374165f51fa3cc3ce1b1bf8c72293464da9d511
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.
gdb/ChangeLog
gdb/target.c
gdb/target.h