public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] [gdb/exp] Fix target type of complex long double on arm
Date: Tue, 28 May 2024 09:11:10 -0600	[thread overview]
Message-ID: <87msoarmy9.fsf@tromey.com> (raw)
In-Reply-To: <20240527032944.19208-1-tdevries@suse.de> (Tom de Vries's message of "Mon, 27 May 2024 05:29:42 +0200")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> For arm-linux, complex long double is 16 bytes, so the target type is assumed
Tom> to be 8 bytes, which is handled by the "case 64", which gets us double
Tom> instead of long double.

Tom> Fix this by searching for "long" in the name_hint parameter, and using long
Tom> double instead.

Can you file a compiler bug report about this and then put the link in a
comment?

Does this same problem occur for scalars of type double -vs- long double?
If so then maybe gdb should just accept that this target is kind of
broken in this way.

Tom> +	  /* If both "double" and "long double" are 8 bytes, choose "double"
Tom> +	     for "complex double" and "long double" for "complex long
Tom> +	     double".  */
Tom> +	  if (builtin_type (gdbarch)->builtin_long_double->length () == 8
Tom> +	      && name_hint != nullptr && *name_hint != '\0'

I don't think the \0 part of this check is needed.

Tom

  parent reply	other threads:[~2024-05-28 15:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27  3:29 Tom de Vries
2024-05-27  3:29 ` [PATCH 2/3] [gdb/exp] Fix gdb.fortran/intrinsics.exp fail " Tom de Vries
2024-06-11  8:51   ` Tom de Vries
2024-06-13  9:14     ` Tom de Vries
2024-05-27  3:29 ` [PATCH 3/3] [gdb/testsuite] Fix gdb.fortran/array-bounds.exp " Tom de Vries
2024-06-07  6:13   ` Tom de Vries
2024-05-28 15:11 ` Tom Tromey [this message]
2024-05-29 11:44   ` [PATCH 1/3] [gdb/exp] Fix target type of complex long double " Tom de Vries
2024-06-03 14:37     ` Tom Tromey
2024-06-07 13:36     ` Tom de Vries
2024-06-19 15:42     ` Tom de Vries
2024-06-03 14:52 ` Luis Machado
2024-06-03 15:04   ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msoarmy9.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).