summaryrefslogtreecommitdiff
path: root/gdb/dcache.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2009-11-13 23:26:19 +0000
committerDoug Evans <dje@google.com>2009-11-13 23:26:19 +0000
commit7f79c47ecf671587d1ef45a7b164b970607c5faf (patch)
tree2a7bcafdd3ebc4d96a0507c909ea90ad5a9a85c9 /gdb/dcache.c
parent2a70cca486d4f175b25db1d484c7c560d14b8216 (diff)
* dcache.c (dcache_hit, dcache_read_line): Tweak comments.
(dcache_peek_byte, dcache_init, dcache_xfer_memory): Ditto. * target.c (memory_xfer_partial): Tweak comments. (target_xfer_partial, target_write_memory): Add comment. (target_read_partial): Remove note from 2003-10-21. (target_read, target_write): Add comments.
Diffstat (limited to 'gdb/dcache.c')
-rw-r--r--gdb/dcache.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/dcache.c b/gdb/dcache.c
index d926e9d45b..b71b707e4b 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -251,7 +251,7 @@ dcache_invalidate_line (DCACHE *dcache, CORE_ADDR addr)
}
/* If addr is present in the dcache, return the address of the block
- containing it. */
+ containing it. Otherwise return NULL. */
static struct dcache_block *
dcache_hit (DCACHE *dcache, CORE_ADDR addr)
@@ -269,7 +269,9 @@ dcache_hit (DCACHE *dcache, CORE_ADDR addr)
return db;
}
-/* Fill a cache line from target memory. */
+/* Fill a cache line from target memory.
+ The result is 1 for success, 0 if the (entire) cache line
+ wasn't readable. */
static int
dcache_read_line (DCACHE *dcache, struct dcache_block *db)
@@ -356,7 +358,7 @@ dcache_alloc (DCACHE *dcache, CORE_ADDR addr)
return db;
}
-/* Using the data cache DCACHE return the contents of the byte at
+/* Using the data cache DCACHE, store in *PTR the contents of the byte at
address ADDR in the remote machine.
Returns 1 for success, 0 for error. */
@@ -411,7 +413,7 @@ dcache_splay_tree_compare (splay_tree_key a, splay_tree_key b)
return -1;
}
-/* Initialize the data cache. */
+/* Allocate and initialize a data cache. */
DCACHE *
dcache_init (void)
@@ -460,7 +462,11 @@ dcache_free (DCACHE *dcache)
to or from debugger address MYADDR. Write to inferior if SHOULD_WRITE is
nonzero.
- The meaning of the result is the same as for target_write. */
+ Return the number of bytes actually transfered, or -1 if the
+ transfer is not supported or otherwise fails. Return of a non-negative
+ value less than LEN indicates that no further transfer is possible.
+ NOTE: This is different than the to_xfer_partial interface, in which
+ positive values less than LEN mean further transfers may be possible. */
int
dcache_xfer_memory (struct target_ops *ops, DCACHE *dcache,