aboutsummaryrefslogtreecommitdiff
path: root/gdb/dcache.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-12-02 10:12:24 +0000
committerPedro Alves <palves@redhat.com>2013-12-02 11:10:20 +0000
commitaee4bf85057de1905f5bfaad2a4be0295905d7fb (patch)
tree4d38c1d340bfc9824fd0cf22d42166dc04402446 /gdb/dcache.c
parent840207d8ee5249c11463baaf5fb37c44595c4f00 (diff)
downloadgdb-aee4bf85057de1905f5bfaad2a4be0295905d7fb.zip
gdb-aee4bf85057de1905f5bfaad2a4be0295905d7fb.tar.gz
gdb-aee4bf85057de1905f5bfaad2a4be0295905d7fb.tar.bz2
Add new target_read_raw_memory function, and consolidate comments.
Tested on x86_64 Fedora 17. gdb/ 2013-12-02 Pedro Alves <palves@redhat.com> * dcache.c (dcache_read_line): Use target_read_raw_memory. * target.c (target_read_raw_memory): New function. (target_read_stack, target_write_memory, target_write_raw_memory): Update comment. (target_read_code): Add comment. * target.h (target_read_raw_memory): Declare.
Diffstat (limited to 'gdb/dcache.c')
-rw-r--r--gdb/dcache.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/dcache.c b/gdb/dcache.c
index 12d1a4b..804d567 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -337,14 +337,13 @@ dcache_read_line (DCACHE *dcache, struct dcache_block *db)
continue;
}
- res = target_read (current_target.beneath, TARGET_OBJECT_RAW_MEMORY,
- NULL, myaddr, memaddr, reg_len);
- if (res < reg_len)
+ res = target_read_raw_memory (memaddr, myaddr, reg_len);
+ if (res != 0)
return 0;
- memaddr += res;
- myaddr += res;
- len -= res;
+ memaddr += reg_len;
+ myaddr += reg_len;
+ len -= reg_len;
}
return 1;