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 Andrew Cagney <ac131313@redhat.com> * mi-main.c (mi_cmd_data_write_register_values): Use deprecated_write_register_bytes instead of write_register_bytes.
This commit is contained in:
parent
2c85904f5a
commit
73937e031a
45 changed files with 204 additions and 167 deletions
|
@ -1,3 +1,23 @@
|
|||
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.
|
||||
|
|
|
@ -1545,7 +1545,7 @@ alpha_store_return_value (struct type *valtype, char *valbuf)
|
|||
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
|
||||
|
|
|
@ -2401,13 +2401,14 @@ arm_store_return_value (struct type *type, char *valbuf)
|
|||
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:
|
||||
|
@ -2418,7 +2419,8 @@ arm_store_return_value (struct type *type, char *valbuf)
|
|||
}
|
||||
}
|
||||
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
|
||||
|
|
|
@ -170,7 +170,7 @@ extern struct type *h8500_register_virtual_type (int regno);
|
|||
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,
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
/* 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;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
/* 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
|
||||
|
|
|
@ -146,7 +146,7 @@ extern CORE_ADDR m32r_frame_saved_pc (struct frame_info *);
|
|||
|
||||
/* 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));
|
||||
|
||||
|
|
|
@ -31,4 +31,4 @@
|
|||
|
||||
/* 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)
|
||||
|
|
|
@ -68,11 +68,11 @@
|
|||
{ \
|
||||
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.
|
||||
|
|
|
@ -64,15 +64,15 @@
|
|||
{ \
|
||||
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)); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
|
@ -154,16 +154,16 @@ extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *);
|
|||
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)); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
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
|
||||
|
|
|
@ -77,7 +77,7 @@ extern int must_suspend_thread;
|
|||
|
||||
/* 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 \
|
||||
|
|
|
@ -264,29 +264,29 @@ call_dummy
|
|||
#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); \
|
||||
|
|
|
@ -30,6 +30,6 @@
|
|||
|
||||
/* 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 */
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
/* 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 */
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/* 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. */
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ enum {
|
|||
#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)); \
|
||||
}
|
||||
|
||||
|
|
|
@ -972,7 +972,7 @@ cris_abi_original_store_return_value (struct type *type, char *valbuf)
|
|||
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.");
|
||||
}
|
||||
|
@ -987,7 +987,8 @@ cris_abi_v2_store_return_value (struct type *type, char *valbuf)
|
|||
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.");
|
||||
|
|
|
@ -486,15 +486,15 @@ d10v_store_return_value (struct type *type, char *valbuf)
|
|||
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
|
||||
|
@ -558,7 +558,8 @@ do_d10v_pop_frame (struct frame_info *fi)
|
|||
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++)
|
||||
|
|
|
@ -1707,8 +1707,8 @@ cfi_pop_frame (struct frame_info *fi)
|
|||
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);
|
||||
|
||||
|
|
|
@ -904,9 +904,10 @@ frv_store_return_value (struct type *type, char *valbuf)
|
|||
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);
|
||||
|
|
|
@ -1469,7 +1469,8 @@ push_dummy_frame (struct inferior_status *inf_status)
|
|||
|
||||
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));
|
||||
|
@ -1548,7 +1549,8 @@ hppa_pop_frame (void)
|
|||
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])
|
||||
|
@ -4710,16 +4712,14 @@ hppa_store_return_value (struct type *type, char *valbuf)
|
|||
|
||||
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.
|
||||
|
|
|
@ -1958,8 +1958,8 @@ ia64_store_return_value (struct type *type, char *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
|
||||
|
|
|
@ -252,7 +252,7 @@ m68k_deprecated_extract_struct_value_address (char *regbuf)
|
|||
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
|
||||
|
@ -463,7 +463,7 @@ m68k_push_dummy_frame (void)
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -493,7 +493,8 @@ m68k_pop_frame (void)
|
|||
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--)
|
||||
|
|
|
@ -1024,8 +1024,9 @@ mcore_store_return_value (struct type *type, char *valbuf)
|
|||
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.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#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"
|
||||
|
@ -632,7 +632,7 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -4666,17 +4666,15 @@ mips_eabi_store_return_value (struct type *valtype, char *valbuf)
|
|||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4690,17 +4688,15 @@ mips_o64_store_return_value (struct type *valtype, char *valbuf)
|
|||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -139,9 +139,11 @@ static void
|
|||
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);
|
||||
|
|
|
@ -470,8 +470,9 @@ ns32k_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
|
|||
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
|
||||
|
|
|
@ -598,29 +598,29 @@ deprecated_registers_fetched (void)
|
|||
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;
|
||||
|
@ -960,7 +960,7 @@ regcache_cooked_write (struct regcache *regcache, int regnum, const void *buf)
|
|||
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;
|
||||
|
|
|
@ -176,6 +176,10 @@ extern char *deprecated_grub_regcache_for_registers (struct regcache *);
|
|||
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
|
||||
|
@ -199,10 +203,6 @@ extern void set_register_cached (int regnum, int state);
|
|||
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);
|
||||
|
||||
|
|
|
@ -509,7 +509,7 @@ static void
|
|||
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
|
||||
|
|
|
@ -466,7 +466,7 @@ static void
|
|||
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
|
||||
|
|
|
@ -3528,7 +3528,8 @@ remote_prepare_to_store (void)
|
|||
/* 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;
|
||||
|
|
|
@ -966,7 +966,7 @@ rs6000_pop_frame (void)
|
|||
}
|
||||
|
||||
/* 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
|
||||
|
@ -2030,19 +2030,19 @@ rs6000_store_return_value (struct type *type, char *valbuf)
|
|||
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
|
||||
|
|
|
@ -1150,8 +1150,8 @@ s390_store_return_value (struct type *valtype, char *valbuf)
|
|||
{
|
||||
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.");
|
||||
|
@ -1161,8 +1161,8 @@ s390_store_return_value (struct type *valtype, char *valbuf)
|
|||
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
|
||||
|
@ -1575,9 +1575,9 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
{
|
||||
/* 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)
|
||||
|
|
|
@ -2473,20 +2473,20 @@ sh_default_store_return_value (struct type *type, char *valbuf)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -990,32 +990,34 @@ sparc_push_dummy_frame (void)
|
|||
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;
|
||||
|
||||
|
@ -1237,8 +1239,8 @@ sparc_pop_frame (void)
|
|||
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))
|
||||
{
|
||||
|
@ -1257,8 +1259,8 @@ sparc_pop_frame (void)
|
|||
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)
|
||||
|
@ -1310,11 +1312,11 @@ sparc_pop_frame (void)
|
|||
|
||||
/* 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))
|
||||
|
@ -2298,15 +2300,16 @@ sparc_store_return_value (struct type *type, char *valbuf)
|
|||
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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -2567,9 +2570,9 @@ sparc64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
|
|||
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 */
|
||||
|
|
|
@ -1089,8 +1089,8 @@ v850_store_return_value (struct type *type, char *valbuf)
|
|||
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);
|
||||
|
|
|
@ -298,7 +298,7 @@ vax_extract_return_value (struct type *valtype, char *regbuf, char *valbuf)
|
|||
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
|
||||
|
|
|
@ -769,8 +769,8 @@ x86_64_store_return_value (struct type *type, char *valbuf)
|
|||
&& 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
|
||||
{
|
||||
|
@ -783,8 +783,8 @@ x86_64_store_return_value (struct type *type, char *valbuf)
|
|||
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
|
||||
|
@ -793,12 +793,13 @@ x86_64_store_return_value (struct type *type, char *valbuf)
|
|||
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__,
|
||||
|
|
|
@ -391,8 +391,8 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
|
|||
}
|
||||
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);
|
||||
|
|
|
@ -309,7 +309,8 @@ write_return_value (struct type *type, char *valbuf)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue