summaryrefslogtreecommitdiff
path: root/gdb/alpha-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-06-14 22:35:25 +0000
committerAndrew Cagney <cagney@redhat.com>2003-06-14 22:35:25 +0000
commit3cafef0d48a8f644dac54495cba4a4b460f5d5e9 (patch)
treebf95954248785252c7b2c859b85beef758498178 /gdb/alpha-tdep.c
parent73f9d49f422902d23ee9c7b6c4c49cc18d3f5195 (diff)
downloadgdb-3cafef0d48a8f644dac54495cba4a4b460f5d5e9.tar.gz
2003-06-14 Andrew Cagney <cagney@redhat.com>
Mark Kettenis <kettenis@gnu.org> * gdbarch.sh (CONVERT_REGISTER_P): Add "type" parameter. (REGISTER_TO_VALUE, VALUE_TO_REGISTER): Replace raw buffer parameter with "frame". * gdbarch.h, gdbarch.c: Re-generate. * frame.h (put_frame_register): Declare. * frame.c (put_frame_register): New function. * arch-utils.c (legacy_convert_register_p): Add "type" parameter. (legacy_register_to_value): Rewrite, use "frame" to get the register value. (legacy_value_to_register): Rewrite, use "frame" to find the register's location before storing. * arch-utils.h (legacy_convert_register_p): Update. (legacy_register_to_value, legacy_value_to_register): Update. * findvar.c (value_from_register): Rewrite, eliminate use of REGISTER_CONVERT_TO_TYPE, pass "type" to CONVERT_REGISTER_P, pass "frame" to REGISTER_TO_VALUE. * valops.c (value_assign): Move the CONVERT_REGISTER code to the lval_reg_frame_relative + lval_register branch of the switch. Do not use REGISTER_CONVERT_FROM_TYPE. Use put_frame_register. * i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM, I386_EDI_REGNUM): New defines. (i386_next_regnum, i386_convert_register_p, i386_register_to_value, i386_value_to_register): New functions. (i386_register_convertible, i386_register_convert_to_virtual, i386_convert_to_raw): Remove functions. (i386_gdbarch_init): Set convert_register_p, register_to_value and value_to_register instead of register_convertible, register_convert_to_virtual and register_convert_to_raw. * mips-tdep.c (mips_convert_register_p): New function. (mips_value_to_register): Replace mips_register_convert_from_type. (mips_register_to_value): Replace mips_register_convert_to_type. (mips_gdbarch_init): Set conver_register_p, value_to_register and register_to_value. * alpha-tdep.c (alpha_convert_register_p): Update. (alpha_value_to_register): Update, store the register. (alpha_register_to_value): Update, fetch the register.
Diffstat (limited to 'gdb/alpha-tdep.c')
-rw-r--r--gdb/alpha-tdep.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index d5235779bd6..fb2ca1851b5 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -206,14 +206,17 @@ alpha_sts (void *out, const void *in)
registers is different. */
static int
-alpha_convert_register_p (int regno)
+alpha_convert_register_p (int regno, struct type *type)
{
return (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 31);
}
static void
-alpha_register_to_value (int regnum, struct type *valtype, char *in, char *out)
+alpha_register_to_value (struct frame_info *frame, int regnum,
+ struct type *valtype, void *out)
{
+ char in[MAX_REGISTER_SIZE];
+ frame_register_read (frame, regnum, in);
switch (TYPE_LENGTH (valtype))
{
case 4:
@@ -228,8 +231,10 @@ alpha_register_to_value (int regnum, struct type *valtype, char *in, char *out)
}
static void
-alpha_value_to_register (struct type *valtype, int regnum, char *in, char *out)
+alpha_value_to_register (struct frame_info *frame, int regnum,
+ struct type *valtype, const void *in)
{
+ char out[MAX_REGISTER_SIZE];
switch (TYPE_LENGTH (valtype))
{
case 4:
@@ -241,6 +246,7 @@ alpha_value_to_register (struct type *valtype, int regnum, char *in, char *out)
default:
error ("Cannot store value in floating point register");
}
+ put_frame_register (frame, regnum, out);
}