aboutsummaryrefslogtreecommitdiff
path: root/gdb/monitor.c
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>2000-08-18 22:52:23 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>2000-08-18 22:52:23 +0000
commite99586d56aa63911e842a974bd8eb7ed20da7af0 (patch)
treea238bf79710b18dfe2b5a0e9927666591f7d8134 /gdb/monitor.c
parent3f0845370f8c14bfd7c196a2d9c2451c2789e355 (diff)
downloadfsf-binutils-gdb-e99586d56aa63911e842a974bd8eb7ed20da7af0.zip
fsf-binutils-gdb-e99586d56aa63911e842a974bd8eb7ed20da7af0.tar.gz
fsf-binutils-gdb-e99586d56aa63911e842a974bd8eb7ed20da7af0.tar.bz2
* MAINTAINERS: Add myself as dcache.c maintainer.
* remote-nindy.c (nindy_load): Invalidate dcache. * dcache.c (dcache_invd): Renamed from dcache_flush. The term flush with respect to caches usually implies that data will be written to memory. (dcache_init, dcache_xfer_memory): Updated. * monitor.c (flush_monitor_dcache, monitor_resume, monitor_load): Updated. * ocd.c (ocd_open, ocd_resume, bdm_reset_command): Updated. * remote-bug.c (bug_load, bug_resume): Updated. * remote-nindy.c (nindy_open, nindy_resume): Updated. * remote-sds.c (sds_open, sds_resume): Updated. * remote-utils.c (gr_open): Updated. * remote.c (remote_open_1, remote_resume, remote_async_resume, remote_cisco_open): Updated. * wince.c (child_create_inferior, child_resume): Updated. * monitor.c (monitor_open): Free dcache before creating a new one. * dcache.c (dcache_free): New function. * dcache.h (dcache_free): New prototype. -------------------------------------------------------------------
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r--gdb/monitor.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c
index b57365e..ca7dd30 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -838,16 +838,14 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty)
monitor_printf (current_monitor->line_term);
- if (!remote_dcache)
- {
- if (current_monitor->flags & MO_HAS_BLOCKWRITES)
- remote_dcache = dcache_init (monitor_read_memory,
- monitor_write_memory_block);
- else
- remote_dcache = dcache_init (monitor_read_memory, monitor_write_memory);
- }
+ if (remote_dcache)
+ dcache_free (remote_dcache);
+
+ if (current_monitor->flags & MO_HAS_BLOCKWRITES)
+ remote_dcache = dcache_init (monitor_read_memory,
+ monitor_write_memory_block);
else
- dcache_flush (remote_dcache);
+ remote_dcache = dcache_init (monitor_read_memory, monitor_write_memory);
start_remote ();
}
@@ -934,7 +932,7 @@ monitor_supply_register (int regno, char *valstr)
void
flush_monitor_dcache (void)
{
- dcache_flush (remote_dcache);
+ dcache_invd (remote_dcache);
}
static void
@@ -950,7 +948,7 @@ monitor_resume (int pid, int step, enum target_signal sig)
dump_reg_flag = 1;
return;
}
- dcache_flush (remote_dcache);
+ dcache_invd (remote_dcache);
if (step)
monitor_printf (current_monitor->step);
else
@@ -2147,7 +2145,7 @@ monitor_wait_srec_ack (void)
static void
monitor_load (char *file, int from_tty)
{
- dcache_flush (remote_dcache);
+ dcache_invd (remote_dcache);
monitor_debug ("MON load\n");
if (current_monitor->load_routine)