From: Keith Seitz <keiths@redhat.com>
To: Tankut Baris Aktemur <tankutbaris.aktemur@amd.com>,
gdb-patches@sourceware.org
Cc: tom@tromey.com
Subject: Re: [PATCH 1/2] gdb: simplify code in check_typedef
Date: Wed, 29 Jul 2026 10:27:03 -0700 [thread overview]
Message-ID: <af831c98-7c0c-4a8a-87e0-24443455a3aa@redhat.com> (raw)
In-Reply-To: <20260727092001.1683349-1-tankutbaris.aktemur@amd.com>
Hi,
On 7/27/26 2:20 AM, Tankut Baris Aktemur wrote:
> Simplify a code portion in check_typedef where the conditions are
> unnecessary. Also remove the comment that says "treat address spaces
> and address classes separately", because since the commit 92fdad7
> "gdb: convert type instance flags to bitfields", they are separate
> fields; so, the comment does not look useful.
Thank you for the quick turnaround for such a, well, minor
corner case. It is very appreciated.
One concern I still have (maybe this is no longer an issue?):
the old logic (and the remaining comment in check_typedef) is outer-wins
on conflict, otherwise inherit from the inner typedef.
Always clearing the RHS and having `merge` never take aspace/class from
it fixes the outer-qualified case, but drops an aspace that appears only
on an inner typedef.
How about encoding outer-wins in `merge` instead, and dropping the
clearing in check_typedef? That would preserve the previous behavior
(and match the comment).
For example:
type_instance_flags::merge:
if (harvard_aspace == HARVARD_ASPACE_NONE)
harvard_aspace = other.harvard_aspace;
if (address_class == 0)
address_class = other.address_class;
and check_typedef:
instance_flags.merge (type->instance_flags ());
I completely agree with the naming change to `merge'. That is
certainly clearer for me.
Thanks,
Keith
prev parent reply other threads:[~2026-07-29 17:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 9:20 Tankut Baris Aktemur
2026-07-27 9:20 ` [PATCH 2/2] gdb: preserve lhs type's address spaces/classes " Tankut Baris Aktemur
2026-07-29 17:27 ` Keith Seitz [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=af831c98-7c0c-4a8a-87e0-24443455a3aa@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tankutbaris.aktemur@amd.com \
--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