aboutsummaryrefslogtreecommitdiff
path: root/sim/rl78
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-10-26 21:53:30 +0545
committerMike Frysinger <vapier@gentoo.org>2022-10-31 21:24:39 +0545
commit5b94c3808140206d3b5204a3780f294d590cc458 (patch)
tree4b5bea9bdc30a6ab503bd3d1c289b5e6f20af836 /sim/rl78
parentf2462532e24ebfc137598d73ee6541948121f040 (diff)
downloadfsf-binutils-gdb-5b94c3808140206d3b5204a3780f294d590cc458.zip
fsf-binutils-gdb-5b94c3808140206d3b5204a3780f294d590cc458.tar.gz
fsf-binutils-gdb-5b94c3808140206d3b5204a3780f294d590cc458.tar.bz2
sim: common: change sim_read & sim_write to use void* buffers
When reading/writing arbitrary data to the system's memory, the unsigned char pointer type doesn't make that much sense. Switch it to void so we align a bit with standard C library read/write functions, and to avoid having to sprinkle casts everywhere.
Diffstat (limited to 'sim/rl78')
-rw-r--r--sim/rl78/gdb-if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/rl78/gdb-if.c b/sim/rl78/gdb-if.c
index a27cc56..8129c09 100644
--- a/sim/rl78/gdb-if.c
+++ b/sim/rl78/gdb-if.c
@@ -205,7 +205,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
/* Read memory. */
int
-sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
+sim_read (SIM_DESC sd, SIM_ADDR mem, void *buf, int length)
{
check_desc (sd);
@@ -221,7 +221,7 @@ sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length)
/* Write memory. */
int
-sim_write (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length)
+sim_write (SIM_DESC sd, SIM_ADDR mem, const void *buf, int length)
{
check_desc (sd);