aboutsummaryrefslogtreecommitdiff
path: root/gdb/alpha-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/alpha-tdep.c')
-rw-r--r--gdb/alpha-tdep.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index cc49a07..2f309a7 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -239,21 +239,28 @@ alpha_convert_register_p (struct gdbarch *gdbarch, int regno,
&& TYPE_LENGTH (type) != 8);
}
-static void
+static int
alpha_register_to_value (struct frame_info *frame, int regnum,
- struct type *valtype, gdb_byte *out)
+ struct type *valtype, gdb_byte *out,
+ int *optimizedp, int *unavailablep)
{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
gdb_byte in[MAX_REGISTER_SIZE];
- frame_register_read (frame, regnum, in);
- switch (TYPE_LENGTH (valtype))
+ /* Convert to TYPE. */
+ if (!get_frame_register_bytes (frame, regnum, 0,
+ register_size (gdbarch, regnum),
+ in, optimizedp, unavailablep))
+ return 0;
+
+ if (TYPE_LENGTH (valtype) == 4)
{
- case 4:
- alpha_sts (get_frame_arch (frame), out, in);
- break;
- default:
- error (_("Cannot retrieve value from floating point register"));
+ alpha_sts (gdbarch, out, in);
+ *optimizedp = *unavailablep = 0;
+ return 1;
}
+
+ error (_("Cannot retrieve value from floating point register"));
}
static void