From: Tom Tromey <tromey@adacore.com>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom de Vries <tdevries@suse.de>
Subject: Re: [PATCH] [gdb/ada] Extend type equivalence test in ada_resolve_enum
Date: Thu, 07 Sep 2023 12:36:05 -0600 [thread overview]
Message-ID: <87zg1xltka.fsf@tromey.com> (raw)
In-Reply-To: <20230907144233.14505-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Thu, 7 Sep 2023 16:42:32 +0200")
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> When using target board debug-types, the enums E1 and E2 are replicated in the
Tom> .debug_types section, and consequently in ada_resolve_enum the type
Tom> equivalence check using a pointer comparison fails:
Tom> ...
Tom> for (int i = 0; i < syms.size (); ++i)
Tom> {
Tom> /* We already know the name matches, so we're just looking for
Tom> an element of the correct enum type. */
Tom> if (ada_check_typedef (syms[i].symbol->type ()) == context_type)
Tom> return i;
Tom> }
Tom> ...
Tom> Fix this by also trying a structural comparison using
Tom> ada_identical_enum_types_p.
Thank you. I think this is ok.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
prev parent reply other threads:[~2023-09-07 18:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 14:42 Tom de Vries
2023-09-07 14:42 ` [PATCH] [gdb/symtab] Fix gdb-index writing for .debug_types Tom de Vries
2023-09-07 18:42 ` Tom Tromey
2023-09-07 18:36 ` 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=87zg1xltka.fsf@tromey.com \
--to=tromey@adacore.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).