diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-15 22:45:57 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-15 22:45:57 +0000 |
commit | 51a7a2128622b0c9d44913b6fa8453b11493c14b (patch) | |
tree | 3be6209be7fb3b1ade2275d41f45ffe6c969bea1 /gdb/regcache.c | |
parent | 61a1198acf6397fc68016561e165a8ca89dcbc16 (diff) | |
download | gdb-51a7a2128622b0c9d44913b6fa8453b11493c14b.zip gdb-51a7a2128622b0c9d44913b6fa8453b11493c14b.tar.gz gdb-51a7a2128622b0c9d44913b6fa8453b11493c14b.tar.bz2 |
* regcache.c (read_register, read_register_pid): Remove.
(write_register, write_register_pid): Likewise.
* regcache.h (read_register, read_register_pid): Remove prototype.
(write_register, write_register_pid): Likewise.
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r-- | gdb/regcache.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c index dc07c9f..5a1073b 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -754,73 +754,6 @@ register_offset_hack (struct gdbarch *gdbarch, int regnum) return descr->register_offset[regnum]; } -/* Return the contents of register REGNUM as an unsigned integer. */ - -ULONGEST -read_register (int regnum) -{ - gdb_byte *buf = alloca (register_size (current_gdbarch, regnum)); - gdb_assert (current_regcache != NULL); - gdb_assert (current_regcache->descr->gdbarch == current_gdbarch); - regcache_cooked_read (current_regcache, regnum, buf); - return (extract_unsigned_integer (buf, register_size (current_gdbarch, 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_size (current_gdbarch, regnum); - buf = alloca (size); - store_signed_integer (buf, size, (LONGEST) val); - gdb_assert (current_regcache != NULL); - gdb_assert (current_regcache->descr->gdbarch == current_gdbarch); - regcache_cooked_write (current_regcache, 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; -} /* Supply register REGNUM, whose contents are stored in BUF, to REGCACHE. */ |