diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2011-12-21 21:13:15 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2011-12-21 21:13:15 +0000 |
commit | 7052e42c350bb65bec5794ea02359992e9c38a2b (patch) | |
tree | 42d2d746a11150b75d0a008e64990651d29345a2 /gdb | |
parent | 9cb80f72d8b8b2f59562692d9385cd5a533e9b3f (diff) | |
download | gdb-7052e42c350bb65bec5794ea02359992e9c38a2b.zip gdb-7052e42c350bb65bec5794ea02359992e9c38a2b.tar.gz gdb-7052e42c350bb65bec5794ea02359992e9c38a2b.tar.bz2 |
gdb/
PR tdep/12797
* arm-tdep.c (arm_return_value): Handle complex types.
gdb/testsuite/
PR tdep/12797
* gdb.base/callfuncs.exp: Remove KFAIL.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 6 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/callfuncs.exp | 3 |
4 files changed, 16 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 78bc56c..faf4a1f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-12-21 Ulrich Weigand <ulrich.weigand@linaro.org> + + PR tdep/12797 + * arm-tdep.c (arm_return_value): Handle complex types. + 2011-12-21 Andreas Schwab <schwab@linux-m68k.org> * ppc-linux-nat.c (create_watchpoint_request): Only use ranged 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); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d1cb3f1..7d399aa 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-21 Ulrich Weigand <ulrich.weigand@linaro.org> + + PR tdep/12797 + * gdb.base/callfuncs.exp: Remove KFAIL. + 2011-12-21 Joel Brobecker <brobecker@adacore.com> * gdb.ada/task_bp: New testcase. diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 614164a..d7f175c 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -248,19 +248,16 @@ proc do_function_calls {} { if [support_complex_tests] { setup_kfail_for_target gdb/12796 "x86_64-*-*" - setup_kfail_for_target gdb/12797 "arm*-*-*" gdb_test "p t_structs_fc(struct_val1)" ".*= 3 \\+ 3 \\* I" \ "call inferior func with struct - returns float _Complex" setup_kfail_for_target gdb/12783 "i?86-*-*" setup_kfail_for_target gdb/12796 "x86_64-*-*" - setup_kfail_for_target gdb/12797 "arm*-*-*" gdb_test "p t_structs_dc(struct_val1)" ".*= 4 \\+ 4 \\* I" \ "call inferior func with struct - returns double _Complex" setup_kfail_for_target gdb/12783 "i?86-*-*" setup_kfail_for_target gdb/12796 "x86_64-*-*" - setup_kfail_for_target gdb/12797 "arm*-*-*" gdb_test "p t_structs_ldc(struct_val1)" "= 5 \\+ 5 \\* I" \ "call inferior func with struct - returns long double _Complex" } |