From: Tom Tromey <tom@tromey.com>
To: Abdul Basit Ijaz <abdul.b.ijaz@intel.com>
Cc: gdb-patches@sourceware.org, thiago.bauermann@linaro.org,
tom@tromey.com, simark@simark.ca,
Bernhard Heckel <bernhard.heckel@intel.com>
Subject: Re: [PATCH v4 2/3] gdb, types: Resolve pointer types dynamically
Date: Thu, 11 Jan 2024 10:50:05 -0700 [thread overview]
Message-ID: <878r4vrc8i.fsf@tromey.com> (raw)
In-Reply-To: <20240104123520.7706-3-abdul.b.ijaz@intel.com> (Abdul Basit Ijaz's message of "Thu, 4 Jan 2024 13:35:19 +0100")
>>>>> "Abdul" == Abdul Basit Ijaz <abdul.b.ijaz@intel.com> writes:
Abdul> + /* We only want to recognize references and pointers at the outermost
Abdul> + level. */
Abdul> + if (top_level
Abdul> + && (type->code () == TYPE_CODE_REF || type->code () == TYPE_CODE_PTR))
Seems like this could use type->is_pointer_or_reference instead.
That would also fix the oversight where TYPE_CODE_RVALUE_REF is omitted.
Abdul> /* Types that have a dynamic TYPE_DATA_LOCATION are considered
Abdul> @@ -2779,6 +2781,7 @@ resolve_dynamic_type_internal (struct type *type,
Abdul> switch (type->code ())
Abdul> {
Abdul> case TYPE_CODE_REF:
Abdul> + case TYPE_CODE_PTR:
... though I guess you'd have to add TYPE_CODE_RVALUE_REF here as well.
Tom
next prev parent reply other threads:[~2024-01-11 17:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 12:35 [PATCH v4 0/3] Dynamic properties of pointers Abdul Basit Ijaz
2024-01-04 12:35 ` [PATCH v4 1/3] gdb/testsuite: Fix indentation issues in gdb.dwarf2/dynarr-ptr.exp Abdul Basit Ijaz
2024-01-11 17:47 ` Tom Tromey
2024-01-12 12:46 ` Ijaz, Abdul B
2024-01-04 12:35 ` [PATCH v4 2/3] gdb, types: Resolve pointer types dynamically Abdul Basit Ijaz
2024-01-11 17:50 ` Tom Tromey [this message]
2024-01-12 17:42 ` Ijaz, Abdul B
2024-01-04 12:35 ` [PATCH v4 3/3] gdb, testsuite, fortran: Fix sizeof intrinsic for Fortran pointers Abdul Basit Ijaz
2024-01-11 17:51 ` [PATCH v4 0/3] Dynamic properties of pointers Tom Tromey
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=878r4vrc8i.fsf@tromey.com \
--to=tom@tromey.com \
--cc=abdul.b.ijaz@intel.com \
--cc=bernhard.heckel@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
--cc=thiago.bauermann@linaro.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).