diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-30 14:54:40 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-30 14:54:40 -0400 |
commit | 4f0420fdabda76f462bd29a02d9be575e0e0cce7 (patch) | |
tree | 8b216760750e3e77021ea6f6567d7a9c5f90f9ca | |
parent | 502fe83eb549476fac09ec62c7fd66447791ba2a (diff) | |
download | binutils-4f0420fdabda76f462bd29a02d9be575e0e0cce7.zip binutils-4f0420fdabda76f462bd29a02d9be575e0e0cce7.tar.gz binutils-4f0420fdabda76f462bd29a02d9be575e0e0cce7.tar.bz2 |
Remove regcache_raw_write_part
Remove regcache_raw_write_part, update callers to use
regcache::raw_write_part instead.
gdb/ChangeLog:
* regcache.h (regcache_raw_write_part): Remove, update callers
to use regcache::raw_write_part instead.
* regcache.c (regcache_raw_write_part): Remove.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/amd64-tdep.c | 6 | ||||
-rw-r--r-- | gdb/amd64-windows-tdep.c | 2 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 6 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 5 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 5 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 5 | ||||
-rw-r--r-- | gdb/regcache.c | 7 | ||||
-rw-r--r-- | gdb/regcache.h | 9 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 5 | ||||
-rw-r--r-- | gdb/xtensa-tdep.c | 2 |
12 files changed, 26 insertions, 34 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e7a57c0..d1ae322 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2018-05-30 Simon Marchi <simon.marchi@ericsson.com> + * regcache.h (regcache_raw_write_part): Remove, update callers + to use regcache::raw_write_part instead. + * regcache.c (regcache_raw_write_part): Remove. + +2018-05-30 Simon Marchi <simon.marchi@ericsson.com> + * regcache.h (regcache_raw_read_part): Remove, update callers to use readable_regcache::raw_read_part instead. * regcache.c (regcache_raw_read_part): Remove. diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index dfd1118..9a1e68e 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -847,8 +847,8 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function, regcache->raw_read_part (regnum, offset, std::min (len, 8), readbuf + i * 8); if (writebuf) - regcache_raw_write_part (regcache, regnum, offset, std::min (len, 8), - writebuf + i * 8); + regcache->raw_write_part (regnum, offset, std::min (len, 8), + writebuf + i * 8); } return RETURN_VALUE_REGISTER_CONVENTION; @@ -956,7 +956,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs, gdb_assert (regnum != -1); memset (buf, 0, sizeof buf); memcpy (buf, valbuf + j * 8, std::min (len, 8)); - regcache_raw_write_part (regcache, regnum, offset, 8, buf); + regcache->raw_write_part (regnum, offset, 8, buf); } } } diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c index bf351ee..7e0c086 100644 --- a/gdb/amd64-windows-tdep.c +++ b/gdb/amd64-windows-tdep.c @@ -331,7 +331,7 @@ amd64_windows_return_value (struct gdbarch *gdbarch, struct value *function, if (readbuf) regcache->raw_read_part (regnum, 0, len, readbuf); if (writebuf) - regcache_raw_write_part (regcache, regnum, 0, len, writebuf); + regcache->raw_write_part (regnum, 0, len, writebuf); return RETURN_VALUE_REGISTER_CONVENTION; } } diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 353fb89..cdb5fc8 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -2880,12 +2880,12 @@ i386_store_return_value (struct gdbarch *gdbarch, struct type *type, int high_size = register_size (gdbarch, HIGH_RETURN_REGNUM); if (len <= low_size) - regcache_raw_write_part (regcache, LOW_RETURN_REGNUM, 0, len, valbuf); + regcache->raw_write_part (LOW_RETURN_REGNUM, 0, len, valbuf); else if (len <= (low_size + high_size)) { regcache->raw_write (LOW_RETURN_REGNUM, valbuf); - regcache_raw_write_part (regcache, HIGH_RETURN_REGNUM, 0, - len - low_size, valbuf + low_size); + regcache->raw_write_part (HIGH_RETURN_REGNUM, 0, len - low_size, + valbuf + low_size); } else internal_error (__FILE__, __LINE__, diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 064bf5e..1490ee2 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1259,11 +1259,10 @@ m68hc11_store_return_value (struct type *type, struct regcache *regcache, /* First argument is passed in D and X registers. */ if (len <= 2) - regcache_raw_write_part (regcache, HARD_D_REGNUM, 2 - len, len, valbuf); + regcache->raw_write_part (HARD_D_REGNUM, 2 - len, len, valbuf); else if (len <= 4) { - regcache_raw_write_part (regcache, HARD_X_REGNUM, 4 - len, - len - 2, valbuf); + regcache->raw_write_part (HARD_X_REGNUM, 4 - len, len - 2, valbuf); regcache->raw_write (HARD_D_REGNUM, valbuf + (len - 2)); } else diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 31c2771..432c37c 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -329,11 +329,10 @@ m68k_store_return_value (struct type *type, struct regcache *regcache, int len = TYPE_LENGTH (type); if (len <= 4) - regcache_raw_write_part (regcache, M68K_D0_REGNUM, 4 - len, len, valbuf); + regcache->raw_write_part (M68K_D0_REGNUM, 4 - len, len, valbuf); else if (len <= 8) { - regcache_raw_write_part (regcache, M68K_D0_REGNUM, 8 - len, - len - 4, valbuf); + regcache->raw_write_part (M68K_D0_REGNUM, 8 - len, len - 4, valbuf); regcache->raw_write (M68K_D1_REGNUM, valbuf + (len - 4)); } else diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 926b084..64b8da7 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -780,7 +780,7 @@ mips_pseudo_register_write (struct gdbarch *gdbarch, register_size (gdbarch, cookednum)) { if (gdbarch_tdep (gdbarch)->mips64_transfers_32bit_regs_p) - regcache_raw_write_part (regcache, rawnum, 0, 4, buf); + regcache->raw_write_part (rawnum, 0, 4, buf); else { /* Sign extend the shortened version of the register prior diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index caaf8d4..edc99a2 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -182,13 +182,12 @@ mn10300_store_return_value (struct gdbarch *gdbarch, struct type *type, regsz = register_size (gdbarch, reg); if (len <= regsz) - regcache_raw_write_part (regcache, reg, 0, len, valbuf); + regcache->raw_write_part (reg, 0, len, valbuf); else if (len <= 2 * regsz) { regcache->raw_write (reg, valbuf); gdb_assert (regsz == register_size (gdbarch, reg + 1)); - regcache_raw_write_part (regcache, reg+1, 0, - len - regsz, valbuf + regsz); + regcache->raw_write_part (reg + 1, 0, len - regsz, valbuf + regsz); } else internal_error (__FILE__, __LINE__, diff --git a/gdb/regcache.c b/gdb/regcache.c index 051bd48..371322d 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -873,12 +873,7 @@ readable_regcache::raw_read_part (int regnum, int offset, int len, gdb_byte *buf return read_part (regnum, offset, len, buf, true); } -void -regcache_raw_write_part (struct regcache *regcache, int regnum, - int offset, int len, const gdb_byte *buf) -{ - regcache->raw_write_part (regnum, offset, len, buf); -} +/* See regcache.h. */ void regcache::raw_write_part (int regnum, int offset, int len, diff --git a/gdb/regcache.h b/gdb/regcache.h index 4865d89..af3adf8 100644 --- a/gdb/regcache.h +++ b/gdb/regcache.h @@ -50,13 +50,6 @@ extern void regcache_raw_write_unsigned (struct regcache *regcache, extern LONGEST regcache_raw_get_signed (struct regcache *regcache, int regnum); -/* Partial transfer of raw registers. These perform read, modify, - write style operations. The read variant returns the status of the - register. */ - -void regcache_raw_write_part (struct regcache *regcache, int regnum, - int offset, int len, const gdb_byte *buf); - void regcache_invalidate (struct regcache *regcache, int regnum); /* Transfer of pseudo-registers. The read variants return a register @@ -333,6 +326,8 @@ public: void raw_collect_integer (int regnum, gdb_byte *addr, int addr_len, bool is_signed) const; + /* Partial transfer of raw registers. Perform read, modify, write style + operations. */ void raw_write_part (int regnum, int offset, int len, const gdb_byte *buf); void cooked_write_part (int regnum, int offset, int len, diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 594f3c4..2523ff6 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2744,9 +2744,8 @@ efpr_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int offset = gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG ? 0 : 8; /* Write the portion that overlaps the VMX register. */ - regcache_raw_write_part (regcache, tdep->ppc_vr0_regnum + reg_index, - offset, register_size (gdbarch, reg_nr), - buffer); + regcache->raw_write_part (tdep->ppc_vr0_regnum + reg_index, offset, + register_size (gdbarch, reg_nr), buffer); } static enum register_status diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c index bee4969..3785c44 100644 --- a/gdb/xtensa-tdep.c +++ b/gdb/xtensa-tdep.c @@ -1646,7 +1646,7 @@ xtensa_store_return_value (struct type *type, for (; len > 0; len -= 4, areg++, valbuf += 4) { if (len < 4) - regcache_raw_write_part (regcache, areg, offset, len, valbuf); + regcache->raw_write_part (areg, offset, len, valbuf); else regcache->raw_write (areg, valbuf); } |