diff options
author | Don Breazeal <donb@codesourcery.com> | 2015-11-20 09:45:44 -0800 |
---|---|---|
committer | Don Breazeal <donb@codesourcery.com> | 2015-11-20 09:45:44 -0800 |
commit | e084c964d61e6f8582711c73738c4df132410597 (patch) | |
tree | 2eefd5014f8be27ca398532ca8e7f15d63303284 /gdb/ChangeLog | |
parent | 314cf376c5b5493eeea6d3b2a357a5c832943b30 (diff) | |
download | gdb-e084c964d61e6f8582711c73738c4df132410597.zip gdb-e084c964d61e6f8582711c73738c4df132410597.tar.gz gdb-e084c964d61e6f8582711c73738c4df132410597.tar.bz2 |
Fix '-data-read-memory-bytes' typo/assertion
This patch fixes a typo in target.c:read_memory_robust, where
it calls read_whatever_is_readable with the function arguments
in the wrong order. Depending on the address being read, it
can cause an xmalloc with a huge size, resulting in an assertion
failure, or just read something other than what was requested.
The problem only arises when GDB is handling an MI
"-data-read-memory-bytes" request and the initial target_read returns
an error status. Note that read_memory_robust is only called from
the MI code.
gdb/ChangeLog:
* gdb/target.c (read_memory_robust): Call
read_whatever_is_readable with arguments in the correct order.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ee1b6ad..5a00b5f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-11-19 Don Breazeal <donb@codesourcery.com> + + * target.c (read_memory_robust): Call read_whatever_is_readable + with arguments in the correct order. + 2015-11-19 Pedro Alves <palves@redhat.com> * remote.c (remote_query_supported): Send the "xmlRegisters=" |