+2002-11-13 Andrew Cagney <cagney@redhat.com>
+
+ * regcache.h (deprecated_read_register_bytes): Rename
+ read_register_bytes.
+ (deprecated_write_register_bytes): Rename write_register_bytes.
+ * alpha-tdep.c, arm-tdep.c, cris-tdep.c, d10v-tdep.c: Update.
+ * dwarf2cfi.c, frv-tdep.c, hppa-tdep.c, ia64-tdep.c: Update.
+ * m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Update.
+ * ns32k-tdep.c, regcache.c, remote-sds.c, remote-vx.c: Update.
+ * remote.c, rs6000-tdep.c, s390-tdep.c, sh-tdep.c: Update.
+ * sparc-tdep.c, v850-tdep.c, vax-tdep.c, x86-64-tdep.c: Update.
+ * xstormy16-tdep.c, z8k-tdep.c, config/nm-gnu.h: Update.
+ * config/nm-m3.h, config/h8500/tm-h8500.h: Update.
+ * config/i386/nm-ptx4.h, config/i386/nm-symmetry.h: Update.
+ * config/m32r/tm-m32r.h, config/m68k/nm-sun3.h: Update.
+ * config/m68k/tm-delta68.h, config/m68k/tm-linux.h: Update.
+ * config/mn10200/tm-mn10200.h, config/pa/tm-hppa64.h: Update.
+ * config/sparc/nm-nbsd.h, config/sparc/nm-sun4os4.h: Update.
+ * config/sparc/nm-sun4sol2.h, config/sparc/tm-sparclet.h: Update.
+
2002-11-13 Jim Blandy <jimb@redhat.com>
* findvar.c (read_var_value): Doc fix.
else
memcpy (raw_buffer, valbuf, length);
- write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, length);
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, length);
}
/* Just like reinit_frame_cache, but with the right arguments to be
case ARM_FLOAT_FPA:
convert_to_extended (valbuf, buf);
- write_register_bytes (REGISTER_BYTE (ARM_F0_REGNUM), buf,
- FP_REGISTER_RAW_SIZE);
+ deprecated_write_register_bytes (REGISTER_BYTE (ARM_F0_REGNUM), buf,
+ FP_REGISTER_RAW_SIZE);
break;
case ARM_FLOAT_SOFT:
case ARM_FLOAT_SOFT_VFP:
- write_register_bytes (ARM_A1_REGNUM, valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (ARM_A1_REGNUM, valbuf,
+ TYPE_LENGTH (type));
break;
default:
}
}
else
- write_register_bytes (ARM_A1_REGNUM, valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (ARM_A1_REGNUM, valbuf,
+ TYPE_LENGTH (type));
}
/* Store the address of the place in which to copy the structure the
of type TYPE, given in virtual format. */
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
- write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
+ deprecated_write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
/* Extract from an array REGBUF containing the (raw) register state
the address in which a function should return its structure value,
/* We must fetch all the regs before storing, since we store all at once. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
#define CHILD_WAIT
struct target_waitstatus;
/* We must fetch all the regs before storing, since we store all at once. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
#ifdef _SEQUENT_
#define CHILD_WAIT
/* mvs_check DEPRECATED_STORE_RETURN_VALUE */
#define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
- write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \
+ deprecated_write_register_bytes(REGISTER_BYTE (V0_REGNUM) + \
((TYPE_LENGTH (TYPE) > 4 ? 8:4) - TYPE_LENGTH (TYPE)),\
(VALBUF), TYPE_LENGTH (TYPE));
/* We have to grab the regs since we store all regs at once. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
{ \
char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
} \
else \
- write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
+ deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
VALBUF, TYPE_LENGTH (TYPE))
/* Return number of args passed to a frame.
{ \
char raw_buffer[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buffer); \
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), \
raw_buffer, TYPE_LENGTH (TYPE)); \
} \
else \
{ \
if (TYPE_CODE (TYPE) == TYPE_CODE_PTR) \
- write_register_bytes (REGISTER_BYTE (A0_REGNUM), VALBUF, \
+ deprecated_write_register_bytes (REGISTER_BYTE (A0_REGNUM), VALBUF, \
TYPE_LENGTH (TYPE)); \
- write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)); \
+ deprecated_write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE)); \
} \
}
internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
else if (TYPE_LENGTH (TYPE) > 2 && TYPE_CODE (TYPE) != TYPE_CODE_PTR) \
{ \
- write_register_bytes (REGISTER_BYTE (0), VALBUF, 2); \
- write_register_bytes (REGISTER_BYTE (1), VALBUF + 2, 2); \
+ deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, 2); \
+ deprecated_write_register_bytes (REGISTER_BYTE (1), VALBUF + 2, 2); \
} \
else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR)\
{ \
- write_register_bytes (REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
+ deprecated_write_register_bytes (REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
} \
else \
{ \
- write_register_bytes (REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); \
+ deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); \
} \
}
extern char *gnu_target_pid_to_str (int pid);
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
/* Don't do wait_for_inferior on attach. */
#define ATTACH_NO_WAIT
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
/* Check if the inferior exists */
#define MACH_ERROR_NO_INFERIOR \
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
{ \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT && !SOFT_FLOAT) \
- write_register_bytes \
+ deprecated_write_register_bytes \
(REGISTER_BYTE (FP4_REGNUM) + \
(REGISTER_SIZE - TYPE_LENGTH (TYPE)), \
(VALBUF), \
TYPE_LENGTH (TYPE)); \
else if (is_integral_type(TYPE) || SOFT_FLOAT) \
- write_register_bytes \
+ deprecated_write_register_bytes \
(REGISTER_BYTE (28) + \
(REGISTER_SIZE - TYPE_LENGTH (TYPE)), \
(VALBUF), \
TYPE_LENGTH (TYPE)); \
else if (TYPE_LENGTH (TYPE) <= 8) \
- write_register_bytes \
+ deprecated_write_register_bytes \
( REGISTER_BYTE (28), \
(VALBUF), \
TYPE_LENGTH (TYPE)); \
else if (TYPE_LENGTH (TYPE) <= 16) \
{ \
- write_register_bytes \
+ deprecated_write_register_bytes \
(REGISTER_BYTE (28), \
(VALBUF), \
8); \
- write_register_bytes \
+ deprecated_write_register_bytes \
(REGISTER_BYTE (29), \
((char *) VALBUF + 8), \
TYPE_LENGTH (TYPE) - 8); \
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
#endif /* NM_NBSD_H */
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
/* Return sizeof user struct to callers in less machine dependent routines */
/* Before storing, we need to read all the registers. */
-#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+#define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
/* Solaris PSRVADDR support does not seem to include a place for nPC. */
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
{ \
/* Other values are returned in register %o0. */ \
- write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
+ deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
TYPE_LENGTH (TYPE)); \
}
int len = TYPE_LENGTH (type);
if (len <= REGISTER_SIZE)
- write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len);
+ deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len);
else
internal_error (__FILE__, __LINE__, "cris_abi_original_store_return_value: type length too large.");
}
if (len <= 2 * REGISTER_SIZE)
{
/* Note that this works since R10 and R11 are consecutive registers. */
- write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len);
+ deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf,
+ len);
}
else
internal_error (__FILE__, __LINE__, "cris_abi_v2_store_return_value: type length too large.");
if (TYPE_LENGTH (type) == 1
&& TYPE_CODE (type) == TYPE_CODE_INT)
{
- write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
- &tmp, 1); /* zero the high byte */
- write_register_bytes (REGISTER_BYTE (RET1_REGNUM) + 1,
- valbuf, 1); /* copy the low byte */
+ /* zero the high byte */
+ deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM), &tmp, 1);
+ /* copy the low byte */
+ deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM) + 1,
+ valbuf, 1);
}
else
- write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
- valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
+ valbuf, TYPE_LENGTH (type));
}
/* Extract from an array REGBUF containing the (raw) register state
if (fi->saved_regs[regnum])
{
read_memory (fi->saved_regs[regnum], raw_buffer, REGISTER_RAW_SIZE (regnum));
- write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
+ REGISTER_RAW_SIZE (regnum));
}
}
for (regnum = 0; regnum < SP_REGNUM; regnum++)
for (regnum = 0; regnum < NUM_REGS; regnum++)
{
get_reg (regbuf, UNWIND_CONTEXT (fi), regnum);
- write_register_bytes (REGISTER_BYTE (regnum), regbuf,
- REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), regbuf,
+ REGISTER_RAW_SIZE (regnum));
}
write_register (PC_REGNUM, UNWIND_CONTEXT (fi)->ra);
int reg8_offset = frv_register_byte (8);
if (length <= 4)
- write_register_bytes (reg8_offset + (4 - length), valbuf, length);
+ deprecated_write_register_bytes (reg8_offset + (4 - length), valbuf,
+ length);
else if (length == 8)
- write_register_bytes (reg8_offset, valbuf, length);
+ deprecated_write_register_bytes (reg8_offset, valbuf, length);
else
internal_error (__FILE__, __LINE__,
"Don't know how to return a %d-byte value.", length);
for (regnum = FP0_REGNUM; regnum < NUM_REGS; regnum++)
{
- read_register_bytes (REGISTER_BYTE (regnum), (char *) &freg_buffer, 8);
+ deprecated_read_register_bytes (REGISTER_BYTE (regnum),
+ (char *) &freg_buffer, 8);
sp = push_bytes (sp, (char *) &freg_buffer, 8);
}
sp = push_word (sp, read_register (IPSW_REGNUM));
if (fsr.regs[regnum])
{
read_memory (fsr.regs[regnum], (char *) &freg_buffer, 8);
- write_register_bytes (REGISTER_BYTE (regnum), (char *) &freg_buffer, 8);
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum),
+ (char *) &freg_buffer, 8);
}
if (fsr.regs[IPSW_REGNUM])
If its a float value, then we also store it into the floating
point registers. */
- write_register_bytes (REGISTER_BYTE (28)
- + (TYPE_LENGTH (type) > 4
- ? (8 - TYPE_LENGTH (type))
- : (4 - TYPE_LENGTH (type))),
- valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (28)
+ + (TYPE_LENGTH (type) > 4
+ ? (8 - TYPE_LENGTH (type))
+ : (4 - TYPE_LENGTH (type))),
+ valbuf, TYPE_LENGTH (type));
if (! SOFT_FLOAT && TYPE_CODE (type) == TYPE_CODE_FLT)
- write_register_bytes (REGISTER_BYTE (FP4_REGNUM),
- valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (FP4_REGNUM),
+ valbuf, TYPE_LENGTH (type));
}
/* Copy the function's return value into VALBUF.
target_store_registers (IA64_FR8_REGNUM);
}
else
- write_register_bytes (REGISTER_BYTE (IA64_GR8_REGNUM),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (IA64_GR8_REGNUM),
+ valbuf, TYPE_LENGTH (type));
}
void
static void
m68k_store_return_value (struct type *type, char *valbuf)
{
- write_register_bytes (0, valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (0, valbuf, TYPE_LENGTH (type));
}
/* Describe the pointer in each stack frame to the previous stack frame
this target or not. */
for (regnum = FP0_REGNUM + 7; regnum >= FP0_REGNUM; regnum--)
{
- read_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
+ deprecated_read_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
sp = push_bytes (sp, raw_buffer, 12);
}
if (frame->saved_regs[regnum])
{
read_memory (frame->saved_regs[regnum], raw_buffer, 12);
- write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, 12);
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer,
+ 12);
}
}
for (regnum = FP_REGNUM - 1; regnum >= 0; regnum--)
zeros = alloca (return_size);
memset (zeros, 0, return_size);
- write_register_bytes (REGISTER_BYTE (RETVAL_REGNUM), zeros, return_size);
- write_register_bytes (offset, valbuf, value_size);
+ deprecated_write_register_bytes (REGISTER_BYTE (RETVAL_REGNUM), zeros,
+ return_size);
+ deprecated_write_register_bytes (offset, valbuf, value_size);
}
/* Initialize our target-dependent "stuff" for this newly created frame.
+2002-11-13 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-main.c (mi_cmd_data_write_register_values): Use
+ deprecated_write_register_bytes instead of write_register_bytes.
+
2002-11-11 Jeff Johnston <jjohnstn@redhat.com>
* gdbmi.texinfo (-var-assign): Add comments about interaction
#include "event-loop.h"
#include "event-top.h"
#include "gdbcore.h" /* for write_memory() */
-#include "value.h" /* for write_register_bytes() */
+#include "value.h" /* for deprecated_write_register_bytes() */
#include "regcache.h"
#include "gdb.h"
#include "frame.h"
old_chain = make_cleanup (xfree, buffer);
store_signed_integer (buffer, REGISTER_SIZE, value);
/* Write it down */
- write_register_bytes (REGISTER_BYTE (regnum), buffer, REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (REGISTER_BYTE (regnum), buffer, REGISTER_RAW_SIZE (regnum));
/* Free the buffer. */
do_cleanups (old_chain);
}
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
- write_register_bytes (REGISTER_BYTE (lo.reg),
- raw_buffer,
- REGISTER_RAW_SIZE (lo.reg));
+ deprecated_write_register_bytes (REGISTER_BYTE (lo.reg), raw_buffer,
+ REGISTER_RAW_SIZE (lo.reg));
if (hi.len > 0)
{
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
- write_register_bytes (REGISTER_BYTE (hi.reg),
- raw_buffer,
- REGISTER_RAW_SIZE (hi.reg));
+ deprecated_write_register_bytes (REGISTER_BYTE (hi.reg), raw_buffer,
+ REGISTER_RAW_SIZE (hi.reg));
}
}
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
- write_register_bytes (REGISTER_BYTE (lo.reg),
- raw_buffer,
- REGISTER_RAW_SIZE (lo.reg));
+ deprecated_write_register_bytes (REGISTER_BYTE (lo.reg), raw_buffer,
+ REGISTER_RAW_SIZE (lo.reg));
if (hi.len > 0)
{
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
- write_register_bytes (REGISTER_BYTE (hi.reg),
- raw_buffer,
- REGISTER_RAW_SIZE (hi.reg));
+ deprecated_write_register_bytes (REGISTER_BYTE (hi.reg), raw_buffer,
+ REGISTER_RAW_SIZE (hi.reg));
}
}
mn10300_store_return_value (struct type *type, char *valbuf)
{
if (TYPE_CODE (type) == TYPE_CODE_PTR)
- write_register_bytes (REGISTER_BYTE (4), valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (4), valbuf,
+ TYPE_LENGTH (type));
else
- write_register_bytes (REGISTER_BYTE (0), valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (0), valbuf,
+ TYPE_LENGTH (type));
}
static struct frame_info *analyze_dummy_frame (CORE_ADDR, CORE_ADDR);
static void
ns32k_store_return_value (struct type *valtype, char *valbuf)
{
- write_register_bytes (TYPE_CODE (valtype) == TYPE_CODE_FLT ?
- FP0_REGNUM : 0, valbuf, TYPE_LENGTH (valtype));
+ deprecated_write_register_bytes (TYPE_CODE (valtype) == TYPE_CODE_FLT
+ ? FP0_REGNUM : 0, valbuf,
+ TYPE_LENGTH (valtype));
}
static CORE_ADDR
Fetching all real regs NEVER accounts for pseudo-regs. */
}
-/* read_register_bytes and write_register_bytes are generally a *BAD*
- idea. They are inefficient because they need to check for partial
- updates, which can only be done by scanning through all of the
- registers and seeing if the bytes that are being read/written fall
- inside of an invalid register. [The main reason this is necessary
- is that register sizes can vary, so a simple index won't suffice.]
- It is far better to call read_register_gen and write_register_gen
- if you want to get at the raw register contents, as it only takes a
- regnum as an argument, and therefore can't do a partial register
- update.
+/* deprecated_read_register_bytes and deprecated_write_register_bytes
+ are generally a *BAD* idea. They are inefficient because they need
+ to check for partial updates, which can only be done by scanning
+ through all of the registers and seeing if the bytes that are being
+ read/written fall inside of an invalid register. [The main reason
+ this is necessary is that register sizes can vary, so a simple
+ index won't suffice.] It is far better to call read_register_gen
+ and write_register_gen if you want to get at the raw register
+ contents, as it only takes a regnum as an argument, and therefore
+ can't do a partial register update.
Prior to the recent fixes to check for partial updates, both read
- and write_register_bytes always checked to see if any registers
- were stale, and then called target_fetch_registers (-1) to update
- the whole set. This caused really slowed things down for remote
- targets. */
+ and deprecated_write_register_bytes always checked to see if any
+ registers were stale, and then called target_fetch_registers (-1)
+ to update the whole set. This caused really slowed things down for
+ remote targets. */
/* Copy INLEN bytes of consecutive data from registers
starting with the INREGBYTE'th byte of register data
into memory at MYADDR. */
void
-read_register_bytes (int in_start, char *in_buf, int in_len)
+deprecated_read_register_bytes (int in_start, char *in_buf, int in_len)
{
int in_end = in_start + in_len;
int regnum;
into registers starting with the MYREGSTART'th byte of register data. */
void
-write_register_bytes (int myregstart, char *myaddr, int inlen)
+deprecated_write_register_bytes (int myregstart, char *myaddr, int inlen)
{
int myregend = myregstart + inlen;
int regnum;
extern char *deprecated_grub_regcache_for_register_valid (struct regcache *);
extern void deprecated_read_register_gen (int regnum, char *myaddr);
extern void deprecated_write_register_gen (int regnum, char *myaddr);
+extern void deprecated_read_register_bytes (int regbyte, char *myaddr,
+ int len);
+extern void deprecated_write_register_bytes (int regbyte, char *myaddr,
+ int len);
/* Character array containing the current state of each register
(unavailable<0, invalid=0, valid>0) for the most recently
extern void registers_changed (void);
-extern void read_register_bytes (int regbyte, char *myaddr, int len);
-
-extern void write_register_bytes (int regbyte, char *myaddr, int len);
-
/* Rename to read_unsigned_register()? */
extern ULONGEST read_register (int regnum);
sds_prepare_to_store (void)
{
/* Make sure the entire registers array is valid. */
- read_register_bytes (0, (char *) NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, (char *) NULL, REGISTER_BYTES);
}
/* Store register REGNO, or all registers if REGNO == -1, from the contents
vx_prepare_to_store (void)
{
/* Fetch all registers, if any of them are not yet fetched. */
- read_register_bytes (0, NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, NULL, REGISTER_BYTES);
}
/* Copy LEN bytes to or from remote inferior's memory starting at MEMADDR
/* NOTE: This isn't rs->sizeof_g_packet because here, we are
forcing the register cache to read its and not the target
registers. */
- read_register_bytes (0, (char *) NULL, REGISTER_BYTES); /* OK use. */
+ deprecated_read_register_bytes (0, (char *) NULL,
+ REGISTER_BYTES); /* OK use. */
break;
case PACKET_ENABLE:
break;
}
/* Make sure that all registers are valid. */
- read_register_bytes (0, NULL, REGISTER_BYTES);
+ deprecated_read_register_bytes (0, NULL, REGISTER_BYTES);
/* Figure out previous %pc value. If the function is frameless, it is
still in the link register, otherwise walk the frames and retrieve the
Say a double_double_double type could be returned in
FPR1/FPR2/FPR3 triple. */
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM + 1), valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM + 1), valbuf,
+ TYPE_LENGTH (type));
else if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
{
if (TYPE_LENGTH (type) == 16
&& TYPE_VECTOR (type))
- write_register_bytes (REGISTER_BYTE (tdep->ppc_vr0_regnum + 2),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (tdep->ppc_vr0_regnum + 2),
+ valbuf, TYPE_LENGTH (type));
}
else
/* Everything else is returned in GPR3 and up. */
- write_register_bytes (REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3),
+ valbuf, TYPE_LENGTH (type));
}
/* Extract from an array REGBUF containing the (raw) register state
{
if (TYPE_LENGTH (valtype) == 4
|| TYPE_LENGTH (valtype) == 8)
- write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM), valbuf,
- TYPE_LENGTH (valtype));
+ deprecated_write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM),
+ valbuf, TYPE_LENGTH (valtype));
else
error ("GDB is unable to return `long double' values "
"on this architecture.");
value =
s390_promote_integer_argument (valtype, valbuf, reg_buff, &arglen);
/* Everything else is returned in GPR2 and up. */
- write_register_bytes (REGISTER_BYTE (S390_GP0_REGNUM + 2), value,
- arglen);
+ deprecated_write_register_bytes (REGISTER_BYTE (S390_GP0_REGNUM + 2),
+ value, arglen);
}
}
static int
{
/* When we store a single-precision value in an FP register,
it occupies the leftmost bits. */
- write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM + fr),
- VALUE_CONTENTS (arg),
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (S390_FP0_REGNUM + fr),
+ VALUE_CONTENTS (arg),
+ TYPE_LENGTH (type));
fr += 2;
}
else if (is_simple_arg (type)
valbuf, TYPE_LENGTH (type));
else
memcpy (buf, valbuf, TYPE_LENGTH (type));
- write_register_bytes (REGISTER_BYTE (R0_REGNUM), buf,
- REGISTER_RAW_SIZE (R0_REGNUM));
+ deprecated_write_register_bytes (REGISTER_BYTE (R0_REGNUM), buf,
+ REGISTER_RAW_SIZE (R0_REGNUM));
}
else
- write_register_bytes (REGISTER_BYTE (R0_REGNUM), valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (R0_REGNUM), valbuf,
+ TYPE_LENGTH (type));
}
static void
sh3e_sh4_store_return_value (struct type *type, char *valbuf)
{
if (TYPE_CODE (type) == TYPE_CODE_FLT)
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
+ valbuf, TYPE_LENGTH (type));
else
sh_default_store_return_value (type, valbuf);
}
if (GDB_TARGET_IS_SPARC64)
{
/* PC, NPC, CCR, FSR, FPRS, Y, ASI */
- read_register_bytes (REGISTER_BYTE (PC_REGNUM), ®ister_temp[0],
- REGISTER_RAW_SIZE (PC_REGNUM) * 7);
- read_register_bytes (REGISTER_BYTE (PSTATE_REGNUM),
- ®ister_temp[7 * SPARC_INTREG_SIZE],
- REGISTER_RAW_SIZE (PSTATE_REGNUM));
+ deprecated_read_register_bytes (REGISTER_BYTE (PC_REGNUM),
+ ®ister_temp[0],
+ REGISTER_RAW_SIZE (PC_REGNUM) * 7);
+ deprecated_read_register_bytes (REGISTER_BYTE (PSTATE_REGNUM),
+ ®ister_temp[7 * SPARC_INTREG_SIZE],
+ REGISTER_RAW_SIZE (PSTATE_REGNUM));
/* FIXME: not sure what needs to be saved here. */
}
else
{
/* Y, PS, WIM, TBR, PC, NPC, FPS, CPS regs */
- read_register_bytes (REGISTER_BYTE (Y_REGNUM), ®ister_temp[0],
- REGISTER_RAW_SIZE (Y_REGNUM) * 8);
+ deprecated_read_register_bytes (REGISTER_BYTE (Y_REGNUM),
+ ®ister_temp[0],
+ REGISTER_RAW_SIZE (Y_REGNUM) * 8);
}
- read_register_bytes (REGISTER_BYTE (O0_REGNUM),
- ®ister_temp[8 * SPARC_INTREG_SIZE],
- SPARC_INTREG_SIZE * 8);
+ deprecated_read_register_bytes (REGISTER_BYTE (O0_REGNUM),
+ ®ister_temp[8 * SPARC_INTREG_SIZE],
+ SPARC_INTREG_SIZE * 8);
- read_register_bytes (REGISTER_BYTE (G0_REGNUM),
- ®ister_temp[16 * SPARC_INTREG_SIZE],
- SPARC_INTREG_SIZE * 8);
+ deprecated_read_register_bytes (REGISTER_BYTE (G0_REGNUM),
+ ®ister_temp[16 * SPARC_INTREG_SIZE],
+ SPARC_INTREG_SIZE * 8);
if (SPARC_HAS_FPU)
- read_register_bytes (REGISTER_BYTE (FP0_REGNUM),
- ®ister_temp[24 * SPARC_INTREG_SIZE],
- FP_REGISTER_BYTES);
+ deprecated_read_register_bytes (REGISTER_BYTE (FP0_REGNUM),
+ ®ister_temp[24 * SPARC_INTREG_SIZE],
+ FP_REGISTER_BYTES);
sp -= DUMMY_STACK_SIZE;
if (fsr[FP0_REGNUM])
{
read_memory (fsr[FP0_REGNUM], raw_buffer, FP_REGISTER_BYTES);
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
- raw_buffer, FP_REGISTER_BYTES);
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM),
+ raw_buffer, FP_REGISTER_BYTES);
}
if (!(GDB_TARGET_IS_SPARC64))
{
if (fsr[G1_REGNUM])
{
read_memory (fsr[G1_REGNUM], raw_buffer, 7 * SPARC_INTREG_SIZE);
- write_register_bytes (REGISTER_BYTE (G1_REGNUM), raw_buffer,
- 7 * SPARC_INTREG_SIZE);
+ deprecated_write_register_bytes (REGISTER_BYTE (G1_REGNUM), raw_buffer,
+ 7 * SPARC_INTREG_SIZE);
}
if (frame->extra_info->flat)
/* Restore the out registers.
Among other things this writes the new stack pointer. */
- write_register_bytes (REGISTER_BYTE (O0_REGNUM), raw_buffer,
- SPARC_INTREG_SIZE * 8);
+ deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), raw_buffer,
+ SPARC_INTREG_SIZE * 8);
- write_register_bytes (REGISTER_BYTE (L0_REGNUM), reg_temp,
- SPARC_INTREG_SIZE * 16);
+ deprecated_write_register_bytes (REGISTER_BYTE (L0_REGNUM), reg_temp,
+ SPARC_INTREG_SIZE * 16);
}
if (!(GDB_TARGET_IS_SPARC64))
deprecated_write_register_gen (regno, buffer);
}
else
- write_register_bytes (REGISTER_BYTE (regno), valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (regno), valbuf,
+ TYPE_LENGTH (type));
}
extern void
sparclet_store_return_value (struct type *type, char *valbuf)
{
/* Other values are returned in register %o0. */
- write_register_bytes (REGISTER_BYTE (O0_REGNUM), valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), valbuf,
+ TYPE_LENGTH (type));
}
default:
internal_error (__FILE__, __LINE__, "bad switch");
}
- write_register_bytes (REGISTER_BYTE (fpreg),
- VALUE_CONTENTS (args[i]),
- len);
+ deprecated_write_register_bytes (REGISTER_BYTE (fpreg),
+ VALUE_CONTENTS (args[i]),
+ len);
}
}
else /* all other args go into the first six 'o' registers */
CORE_ADDR return_buffer;
if (!v850_use_struct_convention (0, type))
- write_register_bytes (REGISTER_BYTE (E_V0_REGNUM), valbuf,
- TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (E_V0_REGNUM), valbuf,
+ TYPE_LENGTH (type));
else
{
return_buffer = read_register (E_V0_REGNUM);
static void
vax_store_return_value (struct type *valtype, char *valbuf)
{
- write_register_bytes (0, valbuf, TYPE_LENGTH (valtype));
+ deprecated_write_register_bytes (0, valbuf, TYPE_LENGTH (valtype));
}
static CORE_ADDR
&& TARGET_LONG_DOUBLE_FORMAT == &floatformat_i387_ext)
{
/* Copy straight over. */
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM), valbuf,
- FPU_REG_RAW_SIZE);
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), valbuf,
+ FPU_REG_RAW_SIZE);
}
else
{
it is the best we can do. */
val = extract_floating (valbuf, TYPE_LENGTH (type));
floatformat_from_doublest (&floatformat_i387_ext, &val, buf);
- write_register_bytes (REGISTER_BYTE (FP0_REGNUM), buf,
- FPU_REG_RAW_SIZE);
+ deprecated_write_register_bytes (REGISTER_BYTE (FP0_REGNUM), buf,
+ FPU_REG_RAW_SIZE);
}
}
else
int high_size = REGISTER_RAW_SIZE (1);
if (len <= low_size)
- write_register_bytes (REGISTER_BYTE (0), valbuf, len);
+ deprecated_write_register_bytes (REGISTER_BYTE (0), valbuf, len);
else if (len <= (low_size + high_size))
{
- write_register_bytes (REGISTER_BYTE (0), valbuf, low_size);
- write_register_bytes (REGISTER_BYTE (1),
- valbuf + low_size, len - low_size);
+ deprecated_write_register_bytes (REGISTER_BYTE (0), valbuf,
+ low_size);
+ deprecated_write_register_bytes (REGISTER_BYTE (1),
+ valbuf + low_size, len - low_size);
}
else
internal_error (__FILE__, __LINE__,
}
else if (xstormy16_type_is_scalar (type) &&
TYPE_LENGTH (type) <= E_MAX_RETTYPE_SIZE_IN_REGS)
- write_register_bytes (REGISTER_BYTE (E_1ST_ARG_REGNUM),
- valbuf, TYPE_LENGTH (type));
+ deprecated_write_register_bytes (REGISTER_BYTE (E_1ST_ARG_REGNUM),
+ valbuf, TYPE_LENGTH (type));
else
{
return_buffer = read_register (E_PTR_RET_REGNUM);
int len;
for (len = 0; len < TYPE_LENGTH (type); len += 2)
- write_register_bytes (REGISTER_BYTE (len / 2 + 2), valbuf + len, 2);
+ deprecated_write_register_bytes (REGISTER_BYTE (len / 2 + 2),
+ valbuf + len, 2);
}
void