mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 16:05:56 +08:00
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.
This commit is contained in:
@ -422,7 +422,7 @@ reg_size (enum sim_rx_regnum 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;
|
||||
DI val;
|
||||
@ -532,7 +532,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;
|
||||
DI val;
|
||||
|
Reference in New Issue
Block a user