diff options
author | Doug Evans <dje@google.com> | 2009-08-20 22:30:12 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2009-08-20 22:30:12 +0000 |
commit | 25f122dc09108d210f78f6ecd7c5077f466352e1 (patch) | |
tree | f3119eeddb749246092e62a64462f0c00200849f /gdb/target.c | |
parent | 824b28db574e0744348a811db21c39f7fb872ff5 (diff) | |
download | gdb-25f122dc09108d210f78f6ecd7c5077f466352e1.zip gdb-25f122dc09108d210f78f6ecd7c5077f466352e1.tar.gz gdb-25f122dc09108d210f78f6ecd7c5077f466352e1.tar.bz2 |
Replace dcache with splay tree.
Remove partially implemented writeback support.
* dcache.c: Include splay-tree.h.
(LINE_SIZE_POWER): Change from 5 to 6.
(DCACHE_SIZE): Change from 64 to 4096.
(ENTRY_INVALID, ENTRY_VALID, ENTRY_DIRTY): Delete.
(state_chars): Delete.
(struct dcache_block): Clean up; remove state and anydirty fields.
(struct dcache_struct): Redefine as a splay tree and linked list.
(last_cache): Make static.
(dcache_invalidate, dcache_hit): Rewrite for new cache structure.
(dcache_read_line, dcache_alloc): Rewrite for new cache structure.
(dcache_write_line): Delete.
(dcache_writeback): Delete.
(dcache_peek_byte): Clean up; remove "invalid" state check.
(dcache_poke_byte): Rewrite for new cache structure; clarify comment.
(dcache_splay_tree_compare): New function.
(dcache_init, dcache_free): Rewrite for new cache structure.
(dcache_xfer_memory): Rewrite for new write-through cache structure.
(dcache_print_line): New function.
(dcache_info): Rewrite for new cache structure.
(_initialize_dcache): Update "info dcache" help text.
* dcache.h (dcache_xfer_memory): Update declaration.
* target.c (memory_xfer_partial): Update calls to dcache_xfer_memory.
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/target.c b/gdb/target.c index 7ee444f..040087b 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -1225,16 +1225,14 @@ memory_xfer_partial (struct target_ops *ops, void *readbuf, const void *writebuf if (region->attrib.cache) { - /* FIXME drow/2006-08-09: This call discards OPS, so the raw - memory request will start back at current_target. */ if (readbuf != NULL) - res = dcache_xfer_memory (target_dcache, memaddr, readbuf, + res = dcache_xfer_memory (ops, target_dcache, memaddr, readbuf, reg_len, 0); else /* FIXME drow/2006-08-09: If we're going to preserve const correctness dcache_xfer_memory should take readbuf and writebuf. */ - res = dcache_xfer_memory (target_dcache, memaddr, + res = dcache_xfer_memory (ops, target_dcache, memaddr, (void *) writebuf, reg_len, 1); if (res <= 0) |