-/* Hack to keep code that view the register buffer as raw bytes
- working. */
-
-int
-register_offset_hack (struct gdbarch *gdbarch, int regnum)
-{
- struct regcache_descr *descr = regcache_descr (gdbarch);
- gdb_assert (regnum >= 0 && regnum < descr->nr_cooked_registers);
- return descr->register_offset[regnum];
-}
-
-/* Return the contents of register REGNUM as an unsigned integer. */
-
-ULONGEST
-read_register (int regnum)
-{
- char *buf = alloca (REGISTER_RAW_SIZE (regnum));
- deprecated_read_register_gen (regnum, buf);
- return (extract_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum)));
-}
-
-ULONGEST
-read_register_pid (int regnum, ptid_t ptid)
-{
- ptid_t save_ptid;
- int save_pid;
- CORE_ADDR retval;
-
- if (ptid_equal (ptid, inferior_ptid))
- return read_register (regnum);
-
- save_ptid = inferior_ptid;
-
- inferior_ptid = ptid;
-
- retval = read_register (regnum);
-
- inferior_ptid = save_ptid;
-
- return retval;
-}
-
-/* Store VALUE into the raw contents of register number REGNUM. */
-
-void
-write_register (int regnum, LONGEST val)
-{
- void *buf;
- int size;
- size = REGISTER_RAW_SIZE (regnum);
- buf = alloca (size);
- store_signed_integer (buf, size, (LONGEST) val);
- deprecated_write_register_gen (regnum, buf);
-}
-
-void
-write_register_pid (int regnum, CORE_ADDR val, ptid_t ptid)
-{
- ptid_t save_ptid;
-
- if (ptid_equal (ptid, inferior_ptid))
- {
- write_register (regnum, val);
- return;
- }
-
- save_ptid = inferior_ptid;
-
- inferior_ptid = ptid;
-
- write_register (regnum, val);
-
- inferior_ptid = save_ptid;
-}
-
-/* FIXME: kettenis/20030828: We should get rid of supply_register and
- regcache_collect in favour of regcache_raw_supply and
- regcache_raw_collect. */
-
-/* SUPPLY_REGISTER()
-
- Record that register REGNUM contains VAL. This is used when the
- value is obtained from the inferior or core dump, so there is no
- need to store the value there.
-
- If VAL is a NULL pointer, then it's probably an unsupported register.
- We just set its value to all zeros. We might want to record this
- fact, and report it to the users of read_register and friends. */
-
-void
-supply_register (int regnum, const void *val)
-{
- 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. */
-
- /* NOTE: cagney/2001-03-16: The macro CLEAN_UP_REGISTER_VALUE is
- going to be deprecated. Instead architectures will leave the raw
- register value as is and instead clean things up as they pass
- through the method gdbarch_pseudo_register_read() clean up the
- values. */
-
-#ifdef DEPRECATED_CLEAN_UP_REGISTER_VALUE
- DEPRECATED_CLEAN_UP_REGISTER_VALUE \
- (regnum, register_buffer (current_regcache, regnum));
-#endif
-}
-
-void
-regcache_collect (int regnum, void *buf)
-{
- regcache_raw_collect (current_regcache, regnum, buf);
-}
-