forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user