aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-06-16 18:23:36 +0000
committerPedro Alves <palves@redhat.com>2009-06-16 18:23:36 +0000
commita42616899b4f89a1bc1177c8edb27e890af40a82 (patch)
tree8681563237d8169cb87d0744aa75436289b21567 /gdb/mi
parentd2149d727fa0cc33a0cd4a8eee78b9fe4108bede (diff)
downloadgdb-a42616899b4f89a1bc1177c8edb27e890af40a82.zip
gdb-a42616899b4f89a1bc1177c8edb27e890af40a82.tar.gz
gdb-a42616899b4f89a1bc1177c8edb27e890af40a82.tar.bz2
* mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
TARGET_OJECT_MEMORY reads to the topmost target, not the the flattened current_target.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 73aec0f..13d6928 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -915,8 +915,11 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
mbuf = xcalloc (total_bytes, 1);
make_cleanup (xfree, mbuf);
- nr_bytes = target_read_until_error (&current_target, TARGET_OBJECT_MEMORY,
- NULL, mbuf, addr, total_bytes);
+ /* Dispatch memory reads to the topmost target, not the flattened
+ current_target. */
+ nr_bytes = target_read_until_error (current_target.beneath,
+ TARGET_OBJECT_MEMORY, NULL, mbuf,
+ addr, total_bytes);
if (nr_bytes <= 0)
error ("Unable to read memory.");