From 1aaa5f999f75129585619739184c9bd2260486b8 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Wed, 24 Jul 2002 19:43:43 +0000 Subject: [PATCH] 2002-07-24 Andrew Cagney * regcache.c (regcache_raw_write): Change buf parameter to a constant void pointer. (regcache_raw_read): Change buf parameter to a void pointer. (legacy_write_register_gen): Change myaddr parameter a constant void pointer. (supply_register): Change val parameter to a const void pointer. * regcache.h (regcache_raw_write): Update declaration. (regcache_raw_read): Update declaration. (supply_register): Update declaration. --- gdb/ChangeLog | 12 ++++++++++++ gdb/regcache.c | 8 ++++---- gdb/regcache.h | 7 ++++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3b2b94e944f..71911905d36 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2002-07-24 Andrew Cagney + + * regcache.c (regcache_raw_write): Change buf parameter to a + constant void pointer. + (regcache_raw_read): Change buf parameter to a void pointer. + (legacy_write_register_gen): Change myaddr parameter a constant + void pointer. + (supply_register): Change val parameter to a const void pointer. + * regcache.h (regcache_raw_write): Update declaration. + (regcache_raw_read): Update declaration. + (supply_register): Update declaration. + 2002-07-24 Tom Tromey * defs.h (gdb_readline_wrapper): Declare. diff --git a/gdb/regcache.c b/gdb/regcache.c index 4f21942bf28..75f88a6533a 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -671,7 +671,7 @@ legacy_read_register_gen (int regnum, char *myaddr) } void -regcache_raw_read (struct regcache *regcache, int regnum, char *buf) +regcache_raw_read (struct regcache *regcache, int regnum, void *buf) { gdb_assert (regcache != NULL && buf != NULL); gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers); @@ -724,7 +724,7 @@ read_register_gen (int regnum, char *buf) REGISTER_RAW_BYTES(REGNUM), which must be in target byte-order. */ static void -legacy_write_register_gen (int regnum, char *myaddr) +legacy_write_register_gen (int regnum, const void *myaddr) { int size; gdb_assert (regnum >= 0 && regnum < (NUM_REGS + NUM_PSEUDO_REGS)); @@ -761,7 +761,7 @@ legacy_write_register_gen (int regnum, char *myaddr) } void -regcache_raw_write (struct regcache *regcache, int regnum, char *buf) +regcache_raw_write (struct regcache *regcache, int regnum, const void *buf) { gdb_assert (regcache != NULL && buf != NULL); gdb_assert (regnum >= 0 && regnum < regcache->descr->nr_raw_registers); @@ -987,7 +987,7 @@ write_register_pid (int regnum, CORE_ADDR val, ptid_t ptid) fact, and report it to the users of read_register and friends. */ void -supply_register (int regnum, char *val) +supply_register (int regnum, const void *val) { #if 1 if (! ptid_equal (registers_ptid, inferior_ptid)) diff --git a/gdb/regcache.h b/gdb/regcache.h index 7de8e2ebe37..cd5bb83ee30 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -35,8 +35,9 @@ struct regcache *regcache_xmalloc (struct gdbarch *gdbarch); /* Transfer a raw register [0..NUM_REGS) between core-gdb and the regcache. */ -void regcache_raw_read (struct regcache *regcache, int rawnum, char *buf); -void regcache_raw_write (struct regcache *regcache, int rawnum, char *buf); +void regcache_raw_read (struct regcache *regcache, int rawnum, void *buf); +void regcache_raw_write (struct regcache *regcache, int rawnum, + const void *buf); int regcache_valid_p (struct regcache *regcache, int regnum); CORE_ADDR regcache_raw_read_as_address (struct regcache *regcache, int rawnum); @@ -44,7 +45,7 @@ CORE_ADDR regcache_raw_read_as_address (struct regcache *regcache, int rawnum); target. These functions are called by the target in response to a target_fetch_registers() or target_store_registers(). */ -extern void supply_register (int regnum, char *val); +extern void supply_register (int regnum, const void *val); extern void regcache_collect (int regnum, void *buf); -- 2.30.2