mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 12:23:31 +08:00
sim: constify sim_write source buffer
Most the sim write functions declare their source buffer const because they only ever read from it. The global sim_write() function does not follow this convention though which causes some warnings when trying to pass it const strings or buffers. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2010-04-13 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* remote-sim.h (sim_write): Add const to buf arg.
|
||||||
|
|
||||||
2009-11-24 DJ Delorie <dj@redhat.com>
|
2009-11-24 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
* sim-rx.h: New.
|
* sim-rx.h: New.
|
||||||
|
@ -175,7 +175,7 @@ int sim_read PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
|
|||||||
memory. Store bytes starting at virtual address MEM. Result is
|
memory. Store bytes starting at virtual address MEM. Result is
|
||||||
number of bytes write, or zero if error. */
|
number of bytes write, or zero if error. */
|
||||||
|
|
||||||
int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
|
int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length));
|
||||||
|
|
||||||
|
|
||||||
/* Fetch register REGNO storing its raw (target endian) value in the
|
/* Fetch register REGNO storing its raw (target endian) value in the
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2010-04-13 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* sim-hrw.c (sim_write): Add const to buf arg.
|
||||||
|
* sim-utils.h (sim_write_fn): Likewise.
|
||||||
|
|
||||||
2010-04-12 Mike Frysinger <vapier@gentoo.org>
|
2010-04-12 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* sim-profile.h (PROFILE_BRANCH_TAKEN, PROFILE_BRANCH_UNTAKEN): New
|
* sim-profile.h (PROFILE_BRANCH_TAKEN, PROFILE_BRANCH_UNTAKEN): New
|
||||||
|
@ -32,7 +32,7 @@ sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
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)
|
||||||
{
|
{
|
||||||
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
|
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
|
||||||
return sim_core_write_buffer (sd, NULL, write_map,
|
return sim_core_write_buffer (sd, NULL, write_map,
|
||||||
|
@ -63,7 +63,7 @@ SIM_RC sim_analyze_program (SIM_DESC sd, char *prog_name,
|
|||||||
This is still accommodated for backward compatibility reasons. */
|
This is still accommodated for backward compatibility reasons. */
|
||||||
|
|
||||||
typedef int sim_write_fn PARAMS ((SIM_DESC sd, SIM_ADDR mem,
|
typedef int sim_write_fn PARAMS ((SIM_DESC sd, SIM_ADDR mem,
|
||||||
unsigned char *buf, int length));
|
const unsigned char *buf, int length));
|
||||||
struct bfd *sim_load_file (SIM_DESC sd, const char *myname,
|
struct bfd *sim_load_file (SIM_DESC sd, const char *myname,
|
||||||
host_callback *callback, char *prog,
|
host_callback *callback, char *prog,
|
||||||
struct bfd *prog_bfd, int verbose_p,
|
struct bfd *prog_bfd, int verbose_p,
|
||||||
|
Reference in New Issue
Block a user