aboutsummaryrefslogtreecommitdiff
path: root/gdb/rx-tdep.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2016-01-23 15:06:08 -0700
committerKevin Buettner <kevinb@redhat.com>2016-01-27 12:34:29 -0700
commit94715c179098ab86bf188fae4a32e2283c5f173f (patch)
tree5791fbc2d00a81169d13eabf0df4d83ff45cc0d8 /gdb/rx-tdep.c
parent27ba7c949773a9f957a519f4b1e2b6d85e5f83b3 (diff)
downloadgdb-94715c179098ab86bf188fae4a32e2283c5f173f.zip
gdb-94715c179098ab86bf188fae4a32e2283c5f173f.tar.gz
gdb-94715c179098ab86bf188fae4a32e2283c5f173f.tar.bz2
rx: Treat scalars larger than 8 bytes as aggregates in rx_push_dummy_call.
This patch fixes the following failures (which are also GDB internal errors) for the -m64bit-doubles multilib: FAIL: gdb.base/callfuncs.exp: p t_double_complex_values(dc1, dc2) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_double_complex_values(dc3, dc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_double_complex_many_args(dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_double_complex_many_args(dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_values(ldc1, ldc2) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_values(ldc3, ldc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_many_args(ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: p t_long_double_complex_many_args(ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1,ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_values(dc1, dc2) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_values(dc3, dc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_many_args(dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4, dc1, dc2, dc3, dc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_double_complex_many_args(dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1, dc1) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_values(ldc1, ldc2) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_values(ldc3, ldc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_many_args(ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4, ldc1, ldc2, ldc3, ldc4) (GDB internal error) FAIL: gdb.base/callfuncs.exp: noproto: p t_long_double_complex_many_args(ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1,ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1, ldc1) (GDB internal error) FAIL: gdb.base/varargs.exp: print find_max_double_real(4, dc1, dc2, dc3, dc4) (GDB internal error) FAIL: gdb.base/varargs.exp: print find_max_long_double_real(4, ldc1, ldc2, ldc3, ldc4) (GDB internal error) The assertion failure which is tripped is: gdb_assert (arg_size <= 4); While it may seem that the patch ought to disallow scalars larger than 4, scalars of size 8 are explicitly handled by the code elsewhere. This came up because gcc has a complex type that is 16 bytes in length when 64-bit doubles are used. gdb/ChangeLog: * rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8 bytes as aggregates.
Diffstat (limited to 'gdb/rx-tdep.c')
-rw-r--r--gdb/rx-tdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index 2732608..904aebd 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -813,7 +813,8 @@ rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct_addr);
}
else if (TYPE_CODE (arg_type) != TYPE_CODE_STRUCT
- && TYPE_CODE (arg_type) != TYPE_CODE_UNION)
+ && TYPE_CODE (arg_type) != TYPE_CODE_UNION
+ && arg_size <= 8)
{
/* Argument is a scalar. */
if (arg_size == 8)