+2017-05-24 Yao Qi <yao.qi@linaro.org>
+
+ * i387-tdep.c (i387_register_to_value): Use register_size
+ instead of TYPE_LENGTH.
+ * m68k-tdep.c (m68k_register_to_value): Likewise.
+
2017-05-24 Yao Qi <yao.qi@linaro.org>
* i387-tdep.c (i387_convert_register_p): Return false if type
}
/* Convert to TYPE. */
- if (!get_frame_register_bytes (frame, regnum, 0, TYPE_LENGTH (type),
+ if (!get_frame_register_bytes (frame, regnum, 0,
+ register_size (gdbarch, regnum),
from, optimizedp, unavailablep))
return 0;
struct type *type, gdb_byte *to,
int *optimizedp, int *unavailablep)
{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
gdb_byte from[M68K_MAX_REGISTER_SIZE];
struct type *fpreg_type = register_type (gdbarch, M68K_FP0_REGNUM);
gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
/* Convert to TYPE. */
- if (!get_frame_register_bytes (frame, regnum, 0, TYPE_LENGTH (type),
+ if (!get_frame_register_bytes (frame, regnum, 0,
+ register_size (gdbarch, regnum),
from, optimizedp, unavailablep))
return 0;