From ee1cffd3883c1d846ad58c1fb86559bb2f930361 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 31 Oct 2022 21:43:10 +0545 Subject: sim: common: change sim_{fetch,store}_register helpers 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') diff --git a/sim/m32c/gdb-if.c b/sim/m32c/gdb-if.c index a74dde9..2b33f40 100644 --- a/sim/m32c/gdb-if.c +++ b/sim/m32c/gdb-if.c @@ -291,7 +291,7 @@ reg_size (enum m32c_sim_reg regno) } int -sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length) +sim_fetch_register (SIM_DESC sd, int regno, void *buf, int length) { size_t size; @@ -403,7 +403,7 @@ sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length) } int -sim_store_register (SIM_DESC sd, int regno, const unsigned char *buf, int length) +sim_store_register (SIM_DESC sd, int regno, const void *buf, int length) { size_t size; -- cgit v1.1