aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v
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/d10v
parentf2462532e24ebfc137598d73ee6541948121f040 (diff)
downloadgdb-5b94c3808140206d3b5204a3780f294d590cc458.zip
gdb-5b94c3808140206d3b5204a3780f294d590cc458.tar.gz
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/d10v')
-rw-r--r--sim/d10v/interp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index fde96aa..c82bb4c 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -706,7 +706,7 @@ xfer_mem (SIM_DESC sd,
int
-sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
+sim_write (SIM_DESC sd, SIM_ADDR addr, const void *buffer, int size)
{
/* FIXME: this should be performing a virtual transfer */
/* FIXME: We cast the const away, but it's safe because xfer_mem only reads
@@ -715,7 +715,7 @@ sim_write (SIM_DESC sd, SIM_ADDR addr, const unsigned char *buffer, int size)
}
int
-sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
+sim_read (SIM_DESC sd, SIM_ADDR addr, void *buffer, int size)
{
/* FIXME: this should be performing a virtual transfer */
return xfer_mem (sd, addr, buffer, size, 0);