diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-10-31 21:43:10 +0545 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-11-02 20:31:10 +0545 |
commit | ee1cffd3883c1d846ad58c1fb86559bb2f930361 (patch) | |
tree | 650a83e14dc8dcb5e061093643102eca8163b461 /include/sim | |
parent | 26f228db710f54b54aea4d9a05214add0cf9f541 (diff) | |
download | binutils-ee1cffd3883c1d846ad58c1fb86559bb2f930361.zip binutils-ee1cffd3883c1d846ad58c1fb86559bb2f930361.tar.gz binutils-ee1cffd3883c1d846ad58c1fb86559bb2f930361.tar.bz2 |
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.
Diffstat (limited to 'include/sim')
-rw-r--r-- | include/sim/sim.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/sim/sim.h b/include/sim/sim.h index 4afdf01..5569481 100644 --- a/include/sim/sim.h +++ b/include/sim/sim.h @@ -189,7 +189,7 @@ int sim_write (SIM_DESC sd, SIM_ADDR mem, const void *buf, int length); If LENGTH does not match the size of REGNO no data is transfered (the actual register size is still returned). */ -int sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length); +int sim_fetch_register (SIM_DESC sd, int regno, void *buf, int length); /* Store register REGNO from the raw (target endian) value in BUF. @@ -203,8 +203,7 @@ int sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length); Return a LENGTH of 0 to indicate the register was not updated but no error has occurred. */ -int sim_store_register (SIM_DESC sd, int regno, const unsigned char *buf, - int length); +int sim_store_register (SIM_DESC sd, int regno, const void *buf, int length); /* Print whatever statistics the simulator has collected. |