aboutsummaryrefslogtreecommitdiff
path: root/sim/w65
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-02-17 04:06:38 +0000
committerAndrew Cagney <cagney@redhat.com>1998-02-17 04:06:38 +0000
commitfbb8b6b9abf5890f5b88b114a88cdf895b6ada96 (patch)
tree6f602eb34e6e9cb47bce68625f9dd568cde93d15 /sim/w65
parentc5efcf3c85119815c96867cb08058a00fa47e1b7 (diff)
downloadgdb-fbb8b6b9abf5890f5b88b114a88cdf895b6ada96.zip
gdb-fbb8b6b9abf5890f5b88b114a88cdf895b6ada96.tar.gz
gdb-fbb8b6b9abf5890f5b88b114a88cdf895b6ada96.tar.bz2
For sim_fetch_register / sim_store_register: Add LENGTH parameter,
return actual size of register, 0 if not applicable, -1 of legacy implementation.
Diffstat (limited to 'sim/w65')
-rw-r--r--sim/w65/ChangeLog7
-rw-r--r--sim/w65/interp.c12
-rw-r--r--sim/w65/run.c2
3 files changed, 16 insertions, 5 deletions
diff --git a/sim/w65/ChangeLog b/sim/w65/ChangeLog
index ecc66ed..aabd236 100644
--- a/sim/w65/ChangeLog
+++ b/sim/w65/ChangeLog
@@ -1,3 +1,10 @@
+Tue Feb 17 12:52:24 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * run.c (main): Pass length into sim_fetch_register.
+
+ * interp.c (sim_store_register, sim_fetch_register): Pass in
+ length parameter. Return -1.
+
Tue Aug 26 10:43:11 1997 Andrew Cagney <cagney@b1.cygnus.com>
* interp.c (sim_kill): Delete.
diff --git a/sim/w65/interp.c b/sim/w65/interp.c
index 6416b25..36c4e32 100644
--- a/sim/w65/interp.c
+++ b/sim/w65/interp.c
@@ -233,10 +233,11 @@ rinfo[] =
0
};
-void
-sim_store_register (rn, value)
+int
+sim_store_register (rn, value, length)
int rn;
unsigned char *value;
+ int length;
{
unsigned int val;
int i;
@@ -247,12 +248,14 @@ sim_store_register (rn, value)
}
*(rinfo[rn].ptr) = val;
+ return -1;
}
-void
-sim_fetch_register (rn, buf)
+int
+sim_fetch_register (rn, buf, length)
int rn;
unsigned char *buf;
+ int length;
{
unsigned int val = *(rinfo[rn].ptr);
int i;
@@ -262,6 +265,7 @@ sim_fetch_register (rn, buf)
*buf++ = val;
val = val >> 8;
}
+ return -1;
}
diff --git a/sim/w65/run.c b/sim/w65/run.c
index eb76590..2d966ee 100644
--- a/sim/w65/run.c
+++ b/sim/w65/run.c
@@ -113,7 +113,7 @@ main (ac, av)
/* Find out what was in r0 and return that */
{
unsigned char b[4];
- sim_fetch_register(0, b);
+ sim_fetch_register(0, b, 4);
return b[3];
}