aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/hppa-tdep.c7
-rw-r--r--gdb/mep-tdep.c5
-rw-r--r--gdb/mips-tdep.c3
-rw-r--r--gdb/ppc-sysv-tdep.c12
-rw-r--r--gdb/regcache.c8
-rw-r--r--gdb/regcache.h4
-rw-r--r--gdb/s390-tdep.c10
-rw-r--r--gdb/score-tdep.c4
-rw-r--r--gdb/spu-tdep.c6
-rw-r--r--gdb/tic6x-tdep.c3
11 files changed, 29 insertions, 39 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4e0b3a2..0f06926 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+ * regcache.h (regcache_cooked_read_part): Remove, update callers
+ to use readable_regcache::cooked_read_part.
+ * regcache.c (regcache_cooked_read_part): Remove.
+
+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
* regcache.h (regcache_cooked_read_value): Remove, update
callers to use readable_regcache::cooked_read_value.
* regcache.c (regcache_cooked_read_value): Remove.
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 1f3581e..81e8a4c 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1152,8 +1152,7 @@ hppa32_return_value (struct gdbarch *gdbarch, struct value *function,
if (part > 0)
{
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, reg, 4 - part,
- part, readbuf);
+ regcache->cooked_read_part (reg, 4 - part, part, readbuf);
if (writebuf != NULL)
regcache_cooked_write_part (regcache, reg, 4 - part,
part, writebuf);
@@ -1243,8 +1242,8 @@ hppa64_return_value (struct gdbarch *gdbarch, struct value *function,
{
while (len > 0)
{
- regcache_cooked_read_part (regcache, regnum, offset,
- std::min (len, 8), readbuf);
+ regcache->cooked_read_part (regnum, offset, std::min (len, 8),
+ readbuf);
readbuf += std::min (len, 8);
len -= std::min (len, 8);
regnum++;
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index 727d247..1f3f2bb 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -2113,9 +2113,8 @@ mep_extract_return_value (struct gdbarch *arch,
offset = 0;
/* Return values that do fit in a single register are returned in R0. */
- regcache_cooked_read_part (regcache, MEP_R0_REGNUM,
- offset, TYPE_LENGTH (type),
- valbuf);
+ regcache->cooked_read_part (MEP_R0_REGNUM, offset, TYPE_LENGTH (type),
+ valbuf);
}
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 64b8da7..fdf00f0 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -510,8 +510,7 @@ mips_xfer_register (struct gdbarch *gdbarch, struct regcache *regcache,
fprintf_unfiltered (gdb_stdlog, "%02x", out[buf_offset + i]);
}
if (in != NULL)
- regcache_cooked_read_part (regcache, reg_num, reg_offset, length,
- in + buf_offset);
+ regcache->cooked_read_part (reg_num, reg_offset, length, in + buf_offset);
if (out != NULL)
regcache_cooked_write_part (regcache, reg_num, reg_offset, length,
out + buf_offset);
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 42dc63c..b7dfdca 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -1805,8 +1805,8 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
regcache_cooked_write_part (regcache, regnum,
offset, TYPE_LENGTH (valtype), writebuf);
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), readbuf);
+ regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
+ readbuf);
return 1;
}
@@ -1881,8 +1881,8 @@ ppc64_sysv_abi_return_value_base (struct gdbarch *gdbarch, struct type *valtype,
regcache_cooked_write_part (regcache, regnum,
offset, TYPE_LENGTH (valtype), writebuf);
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), readbuf);
+ regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
+ readbuf);
return 1;
}
@@ -1986,8 +1986,8 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function,
regcache_cooked_write_part (regcache, regnum,
offset, TYPE_LENGTH (valtype), writebuf);
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), readbuf);
+ regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
+ readbuf);
return RETURN_VALUE_REGISTER_CONVENTION;
}
diff --git a/gdb/regcache.c b/gdb/regcache.c
index ee27f9d..d8fb36e 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -864,14 +864,6 @@ regcache::raw_write_part (int regnum, int offset, int len,
}
enum register_status
-regcache_cooked_read_part (struct regcache *regcache, int regnum,
- int offset, int len, gdb_byte *buf)
-{
- return regcache->cooked_read_part (regnum, offset, len, buf);
-}
-
-
-enum register_status
readable_regcache::cooked_read_part (int regnum, int offset, int len,
gdb_byte *buf)
{
diff --git a/gdb/regcache.h b/gdb/regcache.h
index 3497207..f1a3b24 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -65,9 +65,6 @@ extern void regcache_cooked_write_unsigned (struct regcache *regcache,
/* Partial transfer of a cooked register. These perform read, modify,
write style operations. */
-enum register_status regcache_cooked_read_part (struct regcache *regcache,
- int regnum, int offset,
- int len, gdb_byte *buf);
void regcache_cooked_write_part (struct regcache *regcache, int regnum,
int offset, int len, const gdb_byte *buf);
@@ -230,6 +227,7 @@ public:
template<typename T, typename = RequireLongest<T>>
enum register_status cooked_read (int regnum, T *val);
+ /* Partial transfer of a cooked register. */
enum register_status cooked_read_part (int regnum, int offset, int len,
gdb_byte *buf);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index eaf1550..a894b4b 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1983,8 +1983,7 @@ s390_register_return_value (struct gdbarch *gdbarch, struct type *type,
regcache_cooked_write_part (regcache, S390_F0_REGNUM,
0, length, in);
else
- regcache_cooked_read_part (regcache, S390_F0_REGNUM,
- 0, length, out);
+ regcache->cooked_read_part (S390_F0_REGNUM, 0, length, out);
}
else if (code == TYPE_CODE_ARRAY)
{
@@ -1993,15 +1992,14 @@ s390_register_return_value (struct gdbarch *gdbarch, struct type *type,
regcache_cooked_write_part (regcache, S390_V24_REGNUM,
0, length, in);
else
- regcache_cooked_read_part (regcache, S390_V24_REGNUM,
- 0, length, out);
+ regcache->cooked_read_part (S390_V24_REGNUM, 0, length, out);
}
else if (length <= word_size)
{
/* Integer: zero- or sign-extended in r2. */
if (out != NULL)
- regcache_cooked_read_part (regcache, S390_R2_REGNUM,
- word_size - length, length, out);
+ regcache->cooked_read_part (S390_R2_REGNUM, word_size - length, length,
+ out);
else if (TYPE_UNSIGNED (type))
regcache_cooked_write_unsigned
(regcache, S390_R2_REGNUM,
diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index a167932..aa50126 100644
--- a/gdb/score-tdep.c
+++ b/gdb/score-tdep.c
@@ -442,8 +442,8 @@ score_xfer_register (struct regcache *regcache, int regnum, int length,
}
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, regnum, reg_offset, length,
- readbuf + buf_offset);
+ regcache->cooked_read_part (regnum, reg_offset, length,
+ readbuf + buf_offset);
if (writebuf != NULL)
regcache_cooked_write_part (regcache, regnum, reg_offset, length,
writebuf + buf_offset);
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index d8a2107..583cb62 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -1381,7 +1381,7 @@ spu_regcache_to_value (struct regcache *regcache, int regnum,
if (spu_scalar_value_p (type))
{
int preferred_slot = len < 4 ? 4 - len : 0;
- regcache_cooked_read_part (regcache, regnum, preferred_slot, len, out);
+ regcache->cooked_read_part (regnum, preferred_slot, len, out);
}
else
{
@@ -1393,7 +1393,7 @@ spu_regcache_to_value (struct regcache *regcache, int regnum,
}
if (len > 0)
- regcache_cooked_read_part (regcache, regnum, 0, len, out);
+ regcache->cooked_read_part (regnum, 0, len, out);
}
}
@@ -1556,7 +1556,7 @@ spu_return_value (struct gdbarch *gdbarch, struct value *function,
{
case RETURN_VALUE_REGISTER_CONVENTION:
if (opencl_vector && TYPE_LENGTH (type) == 2)
- regcache_cooked_read_part (regcache, SPU_ARG1_REGNUM, 2, 2, out);
+ regcache->cooked_read_part (SPU_ARG1_REGNUM, 2, 2, out);
else
spu_regcache_to_value (regcache, SPU_ARG1_REGNUM, type, out);
break;
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index 842fe3f..274b02f 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -722,8 +722,7 @@ tic6x_extract_return_value (struct type *valtype, struct regcache *regcache,
register and the second byte occupies byte 0.
so, we read the contents in VAL from the LSBs of register. */
if (len < 3 && byte_order == BFD_ENDIAN_BIG)
- regcache_cooked_read_part (regcache, TIC6X_A4_REGNUM, 4 - len, len,
- valbuf);
+ regcache->cooked_read_part (TIC6X_A4_REGNUM, 4 - len, len, valbuf);
else
regcache->cooked_read (TIC6X_A4_REGNUM, valbuf);
}