From 7052e42c350bb65bec5794ea02359992e9c38a2b Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Wed, 21 Dec 2011 21:13:15 +0000 Subject: gdb/ PR tdep/12797 * arm-tdep.c (arm_return_value): Handle complex types. gdb/testsuite/ PR tdep/12797 * gdb.base/callfuncs.exp: Remove KFAIL. --- gdb/arm-tdep.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/arm-tdep.c') diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 4b3e747..96d295a 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -9061,6 +9061,12 @@ arm_return_value (struct gdbarch *gdbarch, struct type *func_type, return RETURN_VALUE_STRUCT_CONVENTION; } + /* AAPCS returns complex types longer than a register in memory. */ + if (tdep->arm_abi != ARM_ABI_APCS + && TYPE_CODE (valtype) == TYPE_CODE_COMPLEX + && TYPE_LENGTH (valtype) > INT_REGISTER_SIZE) + return RETURN_VALUE_STRUCT_CONVENTION; + if (writebuf) arm_store_return_value (valtype, regcache, writebuf); -- cgit v1.1