aboutsummaryrefslogtreecommitdiff
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)
downloadgdb-5558e7e691534636afa28f6bf68bfd83530d8054.zip
gdb-5558e7e691534636afa28f6bf68bfd83530d8054.tar.gz
gdb-5558e7e691534636afa28f6bf68bfd83530d8054.tar.bz2
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 9c12918..192f07e 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 67441e0..0060582 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 0000000..a03bde8
--- /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 de94f2c..e297c77 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 7f256e2..c477039 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 f8b7842..758b62c 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 e2d801f..5aee8d1 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 9caec41..cd18ead 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 107692f..d6f0caf 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 fe075e1..c7ffa99 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 e12d291..adda60e 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 70394e6..44d60f6 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 e443c16..9827937 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 c44c7ec..fb943f5 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 c25b963..02604d5 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 5caef25..a36a389 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 1cdfd3e..b75aa35 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 ccdb64e..35b70f0 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 0000000..a03bde8
--- /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 044a55b..9769f70 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 8c8256d..149bded 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 5516e00..a276d06 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 043927d..7bd8610 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 079ef9b..a031c59 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 183f1e6..f33c2d0e 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 781ff05..276161b 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 c1a2675..5f5ee20 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 d5a84d7..873817f 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 fb8e8ff..82ab457 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 2b20444..0d1360f 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;