From 65edb64b155d872d42c6ddf6bd17f1d1ed4c4eea Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 13 Apr 2000 22:58:42 +0000 Subject: [PATCH] * mips-tdep.c (do_fp_register_row): copy the number of bytes allocated, not the size of the pointer. --- gdb/ChangeLog | 5 +++++ gdb/mips-tdep.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 318c1d36f3..1c415300ff 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2000-04-13 DJ Delorie + + * mips-tdep.c (do_fp_register_row): copy the number of bytes + allocated, not the size of the pointer. + 2000-04-13 Peter Schauer * config/i386/nm-i386sol2.h (CANNOT_STEP_HW_WATCHPOINTS): Define. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 71b3482b1c..189dd7b1c9 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -2510,7 +2510,7 @@ do_fp_register_row (regnum) regnum + 1, REGISTER_NAME (regnum + 1)); /* copy the two floats into one double, and unpack both */ - memcpy (dbl_buffer, raw_buffer, sizeof (dbl_buffer)); + memcpy (dbl_buffer, raw_buffer, 2 * REGISTER_RAW_SIZE (FP0_REGNUM)); flt1 = unpack_double (builtin_type_float, raw_buffer[HI], &inv1); flt2 = unpack_double (builtin_type_float, raw_buffer[LO], &inv2); doub = unpack_double (builtin_type_double, dbl_buffer, &inv3); @@ -2528,7 +2528,7 @@ do_fp_register_row (regnum) { /* eight byte registers: print each one as float AND as double. */ int offset = 4 * (TARGET_BYTE_ORDER == BIG_ENDIAN); - memcpy (dbl_buffer, raw_buffer[HI], sizeof (dbl_buffer)); + memcpy (dbl_buffer, raw_buffer[HI], 2 * REGISTER_RAW_SIZE (FP0_REGNUM)); flt1 = unpack_double (builtin_type_float, &raw_buffer[HI][offset], &inv1); doub = unpack_double (builtin_type_double, dbl_buffer, &inv3);