PR gdb/12783
authorMark Kettenis <kettenis@gnu.org>
Wed, 24 Oct 2012 14:56:01 +0000 (14:56 +0000)
committerMark Kettenis <kettenis@gnu.org>
Wed, 24 Oct 2012 14:56:01 +0000 (14:56 +0000)
* i386-tdep.c (i386_return_value): Handle complex double and long
double.

gdb/ChangeLog
gdb/i386-tdep.c

index 0a5e79c..b5b0cbc 100644 (file)
@@ -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__]:
index ddb20aa..2768dbc 100644 (file)
@@ -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))
     {