From 55a784010272d22fa1ebbc75a946fa49e4e5d78b Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Wed, 23 Jan 2013 20:03:18 +0000 Subject: =?UTF-8?q?2013-01-23=20=20Tiago=20St=C3=BCrmer=20Daitx=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Set correct type on float conversion for complex type. --- gdb/ChangeLog | 5 +++++ gdb/ppc-sysv-tdep.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3ea3218..b0f2b3f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-01-23 Tiago Stürmer Daitx + + * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Set correct + type on float conversion for complex type. + 2013-01-23 Siva Chandra Reddy Add a new class gdb.Architecture which exposes GDB's diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c index 48b4765..0ffeab9 100644 --- a/gdb/ppc-sysv-tdep.c +++ b/gdb/ppc-sysv-tdep.c @@ -1920,11 +1920,13 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function, gdb_byte regval[MAX_REGISTER_SIZE]; struct type *regtype = register_type (gdbarch, tdep->ppc_fp0_regnum); + struct type *target_type; + target_type = check_typedef (TYPE_TARGET_TYPE (valtype)); if (writebuf != NULL) { convert_typed_floating ((const bfd_byte *) writebuf + - i * (TYPE_LENGTH (valtype) / 2), - valtype, regval, regtype); + i * TYPE_LENGTH (target_type), + target_type, regval, regtype); regcache_cooked_write (regcache, tdep->ppc_fp0_regnum + 1 + i, regval); @@ -1936,8 +1938,8 @@ ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function, regval); convert_typed_floating (regval, regtype, (bfd_byte *) readbuf + - i * (TYPE_LENGTH (valtype) / 2), - valtype); + i * TYPE_LENGTH (target_type), + target_type); } } } -- cgit v1.1