From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] [gdb/exp] Fix target type of complex long double on arm
Date: Fri, 7 Jun 2024 15:36:24 +0200 [thread overview]
Message-ID: <677385c0-3ce5-49a0-8596-a034119280cd@suse.de> (raw)
In-Reply-To: <1d9e21c0-a1ee-4370-8c2f-5a81f7957099@suse.de>
On 5/29/24 13:44, Tom de Vries wrote:
> On 5/28/24 17:11, Tom Tromey wrote:
>>>>>>> "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?
>>
>
> Done ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115272 ).
>
>> 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.
>
> Ah, I see, it's the needle is empty string case that is special, and
> name_hint is the haystack argument.
I've fixed this in a v2 (
https://sourceware.org/pipermail/gdb-patches/2024-June/209753.html ),
and made the comment a bit shorter.
I've also added a dwarf assembly test-case.
Furthermore, I've updated the commit message to make it clear that the
missing explicit target type is standard-conformant (I'm not sure
whether I realized that already when I sent v1).
Thanks,
- Tom
next prev parent reply other threads:[~2024-06-07 13:36 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 ` [PATCH 1/3] [gdb/exp] Fix target type of complex long double " Tom Tromey
2024-05-29 11:44 ` Tom de Vries
2024-06-03 14:37 ` Tom Tromey
2024-06-07 13:36 ` Tom de Vries [this message]
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=677385c0-3ce5-49a0-8596-a034119280cd@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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).