public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] rx: Treat scalars larger than 8 bytes as aggregates in rx_push_dummy_call
@ 2016-01-23 23:18 Kevin Buettner
  2016-01-26 12:39 ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2016-01-23 23:18 UTC (permalink / raw)
  To: gdb-patches

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.
---
 gdb/rx-tdep.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rx: Treat scalars larger than 8 bytes as aggregates in rx_push_dummy_call
  2016-01-23 23:18 [PATCH] rx: Treat scalars larger than 8 bytes as aggregates in rx_push_dummy_call Kevin Buettner
@ 2016-01-26 12:39 ` Joel Brobecker
  2016-01-27 19:37   ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2016-01-26 12:39 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

Hi Kevin,

> gdb/ChangeLog:
>     
>     	* rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8
>     	bytes as aggregates.

I'll trust you on RX matters, and the contents of the message
seems to indicate that you would have tested the change using
our testsuite, so...

OK with me! :-)

> ---
>  gdb/rx-tdep.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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)

-- 
Joel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rx: Treat scalars larger than 8 bytes as aggregates in rx_push_dummy_call
  2016-01-26 12:39 ` Joel Brobecker
@ 2016-01-27 19:37   ` Kevin Buettner
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Buettner @ 2016-01-27 19:37 UTC (permalink / raw)
  To: gdb-patches

On Tue, 26 Jan 2016 16:39:38 +0400
Joel Brobecker <brobecker@adacore.com> wrote:

> Hi Kevin,
> 
> > gdb/ChangeLog:
> >     
> >     	* rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8
> >     	bytes as aggregates.
> 
> I'll trust you on RX matters, and the contents of the message
> seems to indicate that you would have tested the change using
> our testsuite, so...
> 
> OK with me! :-)

Hi Joel,

Thanks for looking it over.

It's pushed now.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-27 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 23:18 [PATCH] rx: Treat scalars larger than 8 bytes as aggregates in rx_push_dummy_call Kevin Buettner
2016-01-26 12:39 ` Joel Brobecker
2016-01-27 19:37   ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).