summaryrefslogtreecommitdiffstats
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-04-14 07:38:06 +0000
committerMike Frysinger <vapier@gentoo.org>2010-04-14 07:38:06 +0000
commit5558e7e691534636afa28f6bf68bfd83530d8054 (patch)
tree4f830ca8baba1d6598b383d6f82566ef12493cfe /sim
parente1caee70eebe9b2aad731f87a94237568d6fa9ac (diff)
downloadppe42-binutils-5558e7e691534636afa28f6bf68bfd83530d8054.tar.gz
ppe42-binutils-5558e7e691534636afa28f6bf68bfd83530d8054.zip
sim: constify sim_write source buffer (part 2)
As pointed out by Sandra Loosemore, a bunch of targets define sim_write themselves instead of using the common/ code. So constify them too. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim')
-rw-r--r--sim/arm/ChangeLog4
-rw-r--r--sim/arm/wrapper.c2
-rw-r--r--sim/avr/ChangeLog3
-rw-r--r--sim/avr/interp.c2
-rw-r--r--sim/cr16/ChangeLog4
-rw-r--r--sim/cr16/interp.c2
-rw-r--r--sim/d10v/ChangeLog4
-rw-r--r--sim/d10v/interp.c2
-rw-r--r--sim/erc32/ChangeLog4
-rw-r--r--sim/erc32/interf.c2
-rw-r--r--sim/h8300/ChangeLog4
-rw-r--r--sim/h8300/compile.c2
-rw-r--r--sim/m32c/ChangeLog6
-rw-r--r--sim/m32c/gdb-if.c2
-rw-r--r--sim/m32c/mem.c4
-rw-r--r--sim/m32c/mem.h2
-rw-r--r--sim/mcore/ChangeLog4
-rw-r--r--sim/mcore/interp.c2
-rw-r--r--sim/microblaze/ChangeLog3
-rw-r--r--sim/microblaze/interp.c2
-rw-r--r--sim/mips/ChangeLog4
-rw-r--r--sim/mips/interp.c2
-rw-r--r--sim/moxie/ChangeLog4
-rw-r--r--sim/moxie/interp.c2
-rw-r--r--sim/ppc/ChangeLog4
-rw-r--r--sim/ppc/sim_calls.c2
-rw-r--r--sim/rx/ChangeLog4
-rw-r--r--sim/rx/gdb-if.c2
-rw-r--r--sim/sh/ChangeLog4
-rw-r--r--sim/sh/interp.c4
30 files changed, 74 insertions, 18 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 9c1291801c..192f07e573 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * wrapper.c (sim_write): Add const to buffer arg.
+
2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index 67441e0dd2..0060582f72 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -158,7 +158,7 @@ int
sim_write (sd, addr, buffer, size)
SIM_DESC sd ATTRIBUTE_UNUSED;
SIM_ADDR addr;
- unsigned char * buffer;
+ const unsigned char * buffer;
int size;
{
int i;
diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
new file mode 100644
index 0000000000..a03bde85b9
--- /dev/null
+++ b/sim/avr/ChangeLog
@@ -0,0 +1,3 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buffer arg.
diff --git a/sim/avr/interp.c b/sim/avr/interp.c
index de94f2c488..e297c77bf6 100644
--- a/sim/avr/interp.c
+++ b/sim/avr/interp.c
@@ -1622,7 +1622,7 @@ sim_trace (SIM_DESC sd)
}
int
-sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
+sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
{
int osize = size;
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 7f256e270e..c4770397e2 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buffer arg.
+
2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c
index f8b7842c65..758b62c0cf 100644
--- a/sim/cr16/interp.c
+++ b/sim/cr16/interp.c
@@ -883,7 +883,7 @@ int
sim_write (sd, addr, buffer, size)
SIM_DESC sd;
SIM_ADDR addr;
- unsigned char *buffer;
+ const unsigned char *buffer;
int size;
{
/* FIXME: this should be performing a virtual transfer */
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index e2d801fd8a..5aee8d15fe 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buffer arg.
+
2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 9caec41289..cd18eadc55 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -761,7 +761,7 @@ int
sim_write (sd, addr, buffer, size)
SIM_DESC sd;
SIM_ADDR addr;
- unsigned char *buffer;
+ const unsigned char *buffer;
int size;
{
/* FIXME: this should be performing a virtual transfer */
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index 107692fed7..d6f0cafca6 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buf arg.
+
2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index fe075e1f28..c7ffa992ca 100644
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -351,7 +351,7 @@ int
sim_write(sd, mem, buf, length)
SIM_DESC sd;
SIM_ADDR mem;
- unsigned char *buf;
+ const unsigned char *buf;
int length;
{
return (sis_memory_write(mem, buf, length));
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index e12d291441..adda60ef6a 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * compile.c (sim_write): Add const to buffer arg.
+
2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 70394e639b..44d60f6d15 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -4616,7 +4616,7 @@ sim_trace (SIM_DESC sd)
}
int
-sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
+sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
{
int i;
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index e443c162da..982793734d 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * gdb-if.c (sim_write): Add const to buf arg.
+ * mem.h (mem_put_blk): Add const to bufptr arg.
+ * mem.c (mem_put_blk): Likewise, and add const to cast.
+
2010-01-20 DJ Delorie <dj@redhat.com>
* m32c.opc (MATH_OP): When doing subtraction, also set carry if
diff --git a/sim/m32c/gdb-if.c b/sim/m32c/gdb-if.c
index c44c7ec765..fb943f5d95 100644
--- a/sim/m32c/gdb-if.c
+++ b/sim/m32c/gdb-if.c
@@ -167,7 +167,7 @@ sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
}
int
-sim_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
+sim_write (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length)
{
check_desc (sd);
diff --git a/sim/m32c/mem.c b/sim/m32c/mem.c
index c25b9637d7..02604d5917 100644
--- a/sim/m32c/mem.c
+++ b/sim/m32c/mem.c
@@ -365,13 +365,13 @@ mem_put_si (int address, unsigned long value)
}
void
-mem_put_blk (int address, void *bufptr, int nbytes)
+mem_put_blk (int address, const void *bufptr, int nbytes)
{
S ("<=");
if (enable_counting)
mem_counters[1][1] += nbytes;
while (nbytes--)
- mem_put_byte (address++, *(unsigned char *) bufptr++);
+ mem_put_byte (address++, *(const unsigned char *) bufptr++);
E ();
}
diff --git a/sim/m32c/mem.h b/sim/m32c/mem.h
index 5caef25edf..a36a389a95 100644
--- a/sim/m32c/mem.h
+++ b/sim/m32c/mem.h
@@ -27,7 +27,7 @@ void mem_put_hi (int address, unsigned short value);
void mem_put_psi (int address, unsigned long value);
void mem_put_si (int address, unsigned long value);
-void mem_put_blk (int address, void *bufptr, int nbytes);
+void mem_put_blk (int address, const void *bufptr, int nbytes);
unsigned char mem_get_pc ();
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index 1cdfd3e37f..b75aa3558e 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buffer arg.
+
2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index ccdb64e914..35b70f08b5 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -1718,7 +1718,7 @@ int
sim_write (sd, addr, buffer, size)
SIM_DESC sd;
SIM_ADDR addr;
- unsigned char * buffer;
+ const unsigned char * buffer;
int size;
{
int i;
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
new file mode 100644
index 0000000000..a03bde85b9
--- /dev/null
+++ b/sim/microblaze/ChangeLog
@@ -0,0 +1,3 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buffer arg.
diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c
index 044a55b879..9769f701b7 100644
--- a/sim/microblaze/interp.c
+++ b/sim/microblaze/interp.c
@@ -704,7 +704,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int
-sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
+sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
{
int i;
init_pointers ();
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 8c8256dcb7..149bded26d 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buffer arg.
+
2010-01-18 Masaki Muranaka <monaka@monami-software.com> (tiny change)
* interp.c: Don't include sysdep.h
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 5516e0021a..a276d06f9b 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -862,7 +862,7 @@ int
sim_write (sd,addr,buffer,size)
SIM_DESC sd;
SIM_ADDR addr;
- unsigned char *buffer;
+ const unsigned char *buffer;
int size;
{
int index;
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index 043927d2b9..7bd86101fd 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buffer arg.
+
2010-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
* interp.c (sim_create_inferior): Fix crashes on zero PROG_BFD or ARGV.
diff --git a/sim/moxie/interp.c b/sim/moxie/interp.c
index 079ef9b1ff..a031c593fe 100644
--- a/sim/moxie/interp.c
+++ b/sim/moxie/interp.c
@@ -1028,7 +1028,7 @@ int
sim_write (sd, addr, buffer, size)
SIM_DESC sd;
SIM_ADDR addr;
- unsigned char * buffer;
+ const unsigned char * buffer;
int size;
{
sim_cpu *scpu = STATE_CPU (sd, 0); /* FIXME */
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 183f1e6567..f33c2d0e1c 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * sim_calls.c (sim_write): Add const to buf arg.
+
2010-02-14 Andreas Schwab <schwab@linux-m68k.org>
* ppc-instructions: Fix missing assignment in last change.
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 781ff055f5..276161b50b 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -144,7 +144,7 @@ sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
int
-sim_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
+sim_write (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length)
{
int result = psim_write_memory(simulator, MAX_NR_PROCESSORS,
buf, mem, length,
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index c1a2675af5..5f5ee20a95 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * gdb-if.c (sim_write): Add const to buf arg.
+
2010-01-30 Masaki Muranaka <monaka@monami-software.com>
* configure.in: Check if the host has getopt.h.
diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c
index d5a84d75d0..873817fb1a 100644
--- a/sim/rx/gdb-if.c
+++ b/sim/rx/gdb-if.c
@@ -245,7 +245,7 @@ sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
}
int
-sim_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
+sim_write (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length)
{
int i;
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index fb8e8ff3ca..82ab457a78 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-14 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (sim_write): Add const to buffer arg.
+
2010-01-12 Masaki Muranaka <monaka@monami-software.com>
* interp.c: Don't include sysdep.h.
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 2b2044430f..0d1360f385 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -81,7 +81,7 @@
extern unsigned short sh_jump_table[], sh_dsp_table[0x1000], ppi_table[];
-int sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size);
+int sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size);
#define O_RECOMPILE 85
#define DEFINE_TABLE
@@ -2141,7 +2141,7 @@ int
sim_write (sd, addr, buffer, size)
SIM_DESC sd;
SIM_ADDR addr;
- unsigned char *buffer;
+ const unsigned char *buffer;
int size;
{
int i;
OpenPOWER on IntegriCloud