mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
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>
This commit is contained in:
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
@ -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 ();
|
||||
|
||||
|
Reference in New Issue
Block a user