From: Tom Tromey <tom@tromey.com>
To: Abdul Basit Ijaz <abdul.b.ijaz@intel.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/1] gdb: Handle TYPE_CODE_COMPLEX in valprint_check_validity.
Date: Wed, 20 May 2026 09:01:29 -0600 [thread overview]
Message-ID: <878q9eazw6.fsf@tromey.com> (raw)
In-Reply-To: <20260520090701.12057-1-abdul.b.ijaz@intel.com> (Abdul Basit Ijaz's message of "Wed, 20 May 2026 11:07:01 +0200")
>>>>> Abdul Basit Ijaz <abdul.b.ijaz@intel.com> writes:
> The issue occurred because valprint_check_validity () only exempted
> TYPE_CODE_UNION, TYPE_CODE_STRUCT, and TYPE_CODE_ARRAY from the
> optimized-out check, but not TYPE_CODE_COMPLEX. Complex types, like
> structures, can have components with different availability.
Thanks for the patch.
I wouldn't be surprised if there are other places that check for
"aggregate" types and overlook the complex number case.
> + DW_OP_implicit_value 0x00 0x00 0x40 0x40
I guess it's possible that this will be something strange on some
system, one with a weird floating point encoding. However I think it's
fine not to worry about it for now.
> +gdb_test "print z1" "= \[0-9\]+ \\+ <optimized out>i" \
Just as an aside, this is the kind of thing that quotemeta makes nicer,
like
[quotemeta " = @DECIMAL + <optimized out>i"]
But anyway what you have is also fine.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
prev parent reply other threads:[~2026-05-20 15:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 9:07 Abdul Basit Ijaz
2026-05-20 15:01 ` Tom Tromey [this message]
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=878q9eazw6.fsf@tromey.com \
--to=tom@tromey.com \
--cc=abdul.b.ijaz@intel.com \
--cc=gdb-patches@sourceware.org \
/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