aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>2000-11-03 22:00:56 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>2000-11-03 22:00:56 +0000
commit4930751aaeebf663e6ce45c683b1653b2c60a68b (patch)
tree7e81de29a0b827fbba6aaa75f87c75fe3843dbb7 /gdb/remote.c
parente0f3df8f1ed27d071960ecdbe318e158133a1c8d (diff)
downloadgdb-4930751aaeebf663e6ce45c683b1653b2c60a68b.zip
gdb-4930751aaeebf663e6ce45c683b1653b2c60a68b.tar.gz
gdb-4930751aaeebf663e6ce45c683b1653b2c60a68b.tar.bz2
* TODO: Note abstraction layer violation where "ocd reset" command
must invalidate the dcache, and how this might be fixed. * monitor.c (#include "dcache.h"): Removed. (remote_dcache): Removed. (monitor_open): Removed code that created local dcache. (flush_monitor_dcache): Removed (unused function). (monitor_resume): Removed call to dcache_invd(). (monitor_load): Likewise. (monitor_xfer_memory): Changed to call monitor_write_memory(), monitor_write_memory_block(), and monitor_read_memory() instead of dcache_xfer_memory(). * monitor.h (flush_monitor_dcache): Removed (unused function). * ocd.c (#include "dcache.h"): Removed. (ocd_dcache): Removed. (ocd_open): Removed code that created local dcache. (ocd_resume): Removed call to dcache_invd(). (ocd_xfer_memory): Changed to call ocd_write_bytes() and ocd_read_bytes() instead of dcache_xfer_memory(). (bdm_reset_command): Invalidate target dcache. * remote-bug.c (bug_load): Remove call to dcache_invd(). (bug_resume): Likewise. (bug_settings): Remove dcache, readfunc, and writefunc fields from initializer. (bug_xfer_memory): Changed to call bug_read_memory() and bug_write_memory() instead of dcache_xfer_memory(). * remote-nindy.c (#include "dcache.h"): Removed. (nindy_dcache): Removed. (nindy_open): Removed code that created local dcache. (nindy_resume): Removed call to dcache_invd(). (nindy_load): Likewise. (nindy_xfer_inferior_memory): Changed to call ninMemPut() and ninMemGet() instead of dcache_xfer_memory(). * remote-sds.c (#include "dcache.h"): Removed. (sds_dcache): Removed. (sds_open): Removed code that created local dcache. (sds_resume): Removed call to dcache_invd(). (sds_xfer_memory): Changed to call sds_write_bytes() and sds_read_bytes() instead of dcache_xfer_memory(). * remote-utils.c (gr_open): Removed code that created local dcache. * remote-utils.h (#include "dcache.h"): Removed. (struct gr_settings): Removed dcache, readfunc, and writefunc fields. (gr_get_dcache, gr_set_dcache): Removed macro definitions. * remote.c (#include "dcache.h"): Removed. (remote_dcache): Removed. (remote_open_1): Removed code that created local dcache. (remote_async_open_1): Likewise. (remote_resume): Removed call to dcache_invd(). (remote_async_resume): Likewise. (remote_xfer_memory): Changed to call remote_write_bytes() and remote_read_bytes() instead of dcache_xfer_memory(). * wince.c (#include "dcache.h"): Removed. (remote_dcache): Removed. (child_create_inferior): Removed code that created local dcache. (child_xfer_memory): Changed to call remote_write_bytes() and remote_read_bytes() instead of dcache_xfer_memory(). (child_resume): Removed call to dcache_invd(). * target.c (target_dcache): Added. (target_load): Invalidate target_dcache. (do_xfer_memory): New function. (target_xfer_memory): Reimplement in terms of dcache_xfer_memory(). (target_xfer_memory_partial): Likewise. (initialize_targets): Create target_dcache. * target.h (#include "dcache.h"): Added. (target_open): Invalidate target_dcache. (target_resume): Likewise. (do_xfer_memory): New declaration. * dcache.c (dcache_init): Removed reading and writing arguments. (dcache_struct): Removed read_memory and write_memory fields. (dcache_write_line): Call do_xfer_memory. (dcache_read_line): Likewise. (dcache_xfer_memory): Likewise. (dcache_invalidate): Renamed from dcache_invd. (dcache_init): Updated. (dcache_xfer_memory): Updated. * dcache.h (memxferfunc): Removed definition.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 61a730e..2cd3089 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -37,8 +37,6 @@
#include "gdbthread.h"
#include "remote.h"
-#include "dcache.h"
-
#include <ctype.h>
#include <sys/time.h>
#ifdef USG
@@ -2027,8 +2025,6 @@ extended_remote_async_open (char *name, int from_tty)
/* Generic code for opening a connection to a remote target. */
-static DCACHE *remote_dcache;
-
static void
init_all_packet_configs (void)
{
@@ -2057,11 +2053,6 @@ serial device is attached to the remote system\n\
unpush_target (target);
- if (!remote_dcache)
- remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
- else
- dcache_invd (remote_dcache);
-
remote_desc = SERIAL_OPEN (name);
if (!remote_desc)
perror_with_name (name);
@@ -2140,8 +2131,6 @@ serial device is attached to the remote system\n\
unpush_target (target);
- remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
-
remote_desc = SERIAL_OPEN (name);
if (!remote_desc)
perror_with_name (name);
@@ -2309,8 +2298,6 @@ remote_resume (int pid, int step, enum target_signal siggnal)
else
set_thread (pid, 0); /* run this thread */
- dcache_invd (remote_dcache);
-
last_sent_signal = siggnal;
last_sent_step = step;
@@ -2343,8 +2330,6 @@ remote_async_resume (int pid, int step, enum target_signal siggnal)
else
set_thread (pid, 0); /* run this thread */
- dcache_invd (remote_dcache);
-
last_sent_signal = siggnal;
last_sent_step = step;
@@ -3555,12 +3540,18 @@ remote_xfer_memory (CORE_ADDR mem_addr, char *buffer, int mem_len,
{
CORE_ADDR targ_addr;
int targ_len;
+ int res;
+
REMOTE_TRANSLATE_XFER_ADDRESS (mem_addr, mem_len, &targ_addr, &targ_len);
if (targ_len <= 0)
return 0;
- return dcache_xfer_memory (remote_dcache, targ_addr, buffer,
- targ_len, should_write);
+ if (should_write)
+ res = remote_write_bytes (targ_addr, buffer, targ_len);
+ else
+ res = remote_read_bytes (targ_addr, buffer, targ_len);
+
+ return res;
}
@@ -5044,11 +5035,6 @@ device is attached to the remote system (e.g. host:port).");
unpush_target (&remote_cisco_ops);
- if (!remote_dcache)
- remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
- else
- dcache_invd (remote_dcache);
-
remote_desc = SERIAL_OPEN (name);
if (!remote_desc)
perror_with_name (name);