diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-10-26 21:53:30 +0545 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-10-31 21:24:39 +0545 |
commit | 5b94c3808140206d3b5204a3780f294d590cc458 (patch) | |
tree | 4b5bea9bdc30a6ab503bd3d1c289b5e6f20af836 /include/sim | |
parent | f2462532e24ebfc137598d73ee6541948121f040 (diff) | |
download | binutils-5b94c3808140206d3b5204a3780f294d590cc458.zip binutils-5b94c3808140206d3b5204a3780f294d590cc458.tar.gz binutils-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 'include/sim')
-rw-r--r-- | include/sim/sim.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sim/sim.h b/include/sim/sim.h index 8611cf0..ae8f194 100644 --- a/include/sim/sim.h +++ b/include/sim/sim.h @@ -170,14 +170,14 @@ SIM_RC sim_create_inferior (SIM_DESC sd, struct bfd *abfd, at virtual address MEM and store in BUF. Result is number of bytes read, or zero if error. */ -int sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length); +int sim_read (SIM_DESC sd, SIM_ADDR mem, void *buf, int length); /* Store LENGTH bytes from BUF into the simulated program's memory. Store bytes starting at virtual address MEM. Result is number of bytes write, or zero if error. */ -int sim_write (SIM_DESC sd, SIM_ADDR mem, const unsigned char *buf, int length); +int sim_write (SIM_DESC sd, SIM_ADDR mem, const void *buf, int length); /* Fetch register REGNO storing its raw (target endian) value in the |