From 7bace51ba7ef8771a61980c5283bb8fc980fdf38 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 29 Aug 2003 11:48:04 +0000 Subject: [PATCH] * regcache.c (supply_register): Reimplement to call regcache_raw_supply. (regcache_collect): Reimplement by calling regcache_raw_collect. --- gdb/ChangeLog | 6 ++++++ gdb/regcache.c | 19 ++----------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c8d72bdc4e4..32c6819f550 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-08-29 Mark Kettenis + + * regcache.c (supply_register): Reimplement to call + regcache_raw_supply. + (regcache_collect): Reimplement by calling regcache_raw_collect. + 2003-08-28 Mark Kettenis * regcache.c (register_buffer): Consitify first argument. diff --git a/gdb/regcache.c b/gdb/regcache.c index 1db86e864cb..36f3c56ed44 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -1218,21 +1218,7 @@ write_register_pid (int regnum, CORE_ADDR val, ptid_t ptid) void supply_register (int regnum, const void *val) { -#if 1 - if (! ptid_equal (registers_ptid, inferior_ptid)) - { - registers_changed (); - registers_ptid = inferior_ptid; - } -#endif - - set_register_cached (regnum, 1); - if (val) - memcpy (register_buffer (current_regcache, regnum), val, - REGISTER_RAW_SIZE (regnum)); - else - memset (register_buffer (current_regcache, regnum), '\000', - REGISTER_RAW_SIZE (regnum)); + regcache_raw_supply (current_regcache, regnum, val); /* On some architectures, e.g. HPPA, there are a few stray bits in some registers, that the rest of the code would like to ignore. */ @@ -1252,8 +1238,7 @@ supply_register (int regnum, const void *val) void regcache_collect (int regnum, void *buf) { - memcpy (buf, register_buffer (current_regcache, regnum), - REGISTER_RAW_SIZE (regnum)); + regcache_raw_collect (current_regcache, regnum, buf); } /* Supply register REGNUM, whose contents are store in BUF, to REGCACHE. */ -- 2.30.2