From 5b94c3808140206d3b5204a3780f294d590cc458 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 26 Oct 2022 21:53:30 +0545 Subject: 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. --- sim/m32c/gdb-if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/m32c/gdb-if.c') diff --git a/sim/m32c/gdb-if.c b/sim/m32c/gdb-if.c index ffbdbd2..8bb8e9b 100644 --- a/sim/m32c/gdb-if.c +++ b/sim/m32c/gdb-if.c @@ -159,7 +159,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd * abfd, } 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); @@ -172,7 +172,7 @@ sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length) } 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); -- cgit v1.1