aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2012-10-24 14:56:01 +0000
committerMark Kettenis <kettenis@gnu.org>2012-10-24 14:56:01 +0000
commit2445fd7b3ae9a30a75e4ab265b29ec97da6ad44e (patch)
treec22b9aa67bd6b2b91166cddc5046b8c85c7770ab /gdb
parent6e933c51ce6e8a94e6148ec4ba0eea0425fb0e17 (diff)
downloadgdb-2445fd7b3ae9a30a75e4ab265b29ec97da6ad44e.zip
gdb-2445fd7b3ae9a30a75e4ab265b29ec97da6ad44e.tar.gz
gdb-2445fd7b3ae9a30a75e4ab265b29ec97da6ad44e.tar.bz2
PR gdb/12783
* i386-tdep.c (i386_return_value): Handle complex double and long double.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/i386-tdep.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0a5e79c..b5b0cbc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-24 Mark Kettenis <kettenis@gnu.org>
+
+ PR gdb/12783
+ * i386-tdep.c (i386_return_value): Handle complex double and long
+ double.
+
2012-10-24 Joel Brobecker <brobecker@adacore.com>
* windows-nat.c (windows_create_inferior) [!__CYGWIN__]:
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index ddb20aa..2768dbc 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -2630,6 +2630,9 @@ i386_return_value (struct gdbarch *gdbarch, struct value *function,
|| code == TYPE_CODE_UNION
|| code == TYPE_CODE_ARRAY)
&& !i386_reg_struct_return_p (gdbarch, type))
+ /* Complex double and long double uses the struct return covention. */
+ || (code == TYPE_CODE_COMPLEX && TYPE_LENGTH (type) == 16)
+ || (code == TYPE_CODE_COMPLEX && TYPE_LENGTH (type) == 24)
/* 128-bit decimal float uses the struct return convention. */
|| (code == TYPE_CODE_DECFLOAT && TYPE_LENGTH (type) == 16))
{