diff options
author | sergiodj <sergiodj> | 2013-01-23 20:03:15 +0000 |
---|---|---|
committer | sergiodj <sergiodj> | 2013-01-23 20:03:15 +0000 |
commit | dab2171857b963c6b0ff32c9792ff13dd73b035d (patch) | |
tree | 1bd27235028e7f1a098407a96c41fd021910ee2c /gdb/ppc-sysv-tdep.c | |
parent | 326c0ad74a07bb9532a53e830096a784ab96f683 (diff) | |
download | gdb-dab2171857b963c6b0ff32c9792ff13dd73b035d.tar.gz |
2013-01-23 Tiago Stürmer Daitx <tdaitx@linux.vnet.ibm.com>
* ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Set correct
type on float conversion for complex type.
Diffstat (limited to 'gdb/ppc-sysv-tdep.c')
-rw-r--r-- | gdb/ppc-sysv-tdep.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c index 48b47656984..0ffeab9745c 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); } } } |