From a378f4192681bdbeb5f7aa12ae3c6e9505cd14a7 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 13 Aug 2002 13:58:50 +0000 Subject: 2002-08-12 Andrew Cagney * regcache.c (regcache_raw_read_as_address): Delete function. (regcache_cooked_read_signed): New function. (regcache_cooked_read_unsigned): New function. * regcache.h (regcache_cooked_read_signed): Declare. (regcache_cooked_read_unsigned): Declare. (regcache_raw_read_as_address): Delete declaration. * blockframe.c (generic_read_register_dummy): Use regcache_cooked_read_unsigned. * i386-tdep.c (i386_extract_struct_value_address): Use regcache_cooked_read_unsigned. --- gdb/regcache.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gdb/regcache.h') diff --git a/gdb/regcache.h b/gdb/regcache.h index 5ca7bab..117b088 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -39,13 +39,26 @@ 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); /* Transfer a cooked register [0..NUM_REGS+NUM_PSEUDO_REGS). */ void regcache_cooked_read (struct regcache *regcache, int rawnum, void *buf); void regcache_cooked_write (struct regcache *regcache, int rawnum, const void *buf); +/* NOTE: cagney/2002-08-13: At present GDB has no reliable mechanism + for indicating when a ``cooked'' register was constructed from + invalid or unavailable ``raw'' registers. One fairly easy way of + adding such a mechanism would be for the cooked functions to return + a register valid indication. Given the possibility of such a + change, the extract functions below use a reference parameter, + rather than a function result. */ + +/* Read a register as a signed/unsigned quantity. */ +extern void regcache_cooked_read_signed (struct regcache *regcache, + int regnum, LONGEST *val); +extern void regcache_cooked_read_unsigned (struct regcache *regcache, + int regnum, ULONGEST *val); + /* Transfer a raw register [0..NUM_REGS) between the regcache and the target. These functions are called by the target in response to a target_fetch_registers() or target_store_registers(). */ -- cgit v1.1