From: Kevin Buettner via Gdb-patches <gdb-patches@sourceware.org>
To: "Potharla, Rupesh via Gdb-patches" <gdb-patches@sourceware.org>
Cc: "George, Jini Susan" <JiniSusan.George@amd.com>,
"Parasuraman, Hariharan" <Hariharan.Parasuraman@amd.com>,
"Sharma, Alok Kumar" <AlokKumar.Sharma@amd.com>,
"Potharla, Rupesh" <Rupesh.Potharla@amd.com>
Subject: Re: GDB/Fortran: Support for Assumed Rank Zero.
Date: Wed, 13 Apr 2022 11:27:53 -0700 [thread overview]
Message-ID: <20220413112753.4c6f1128@f35-zws-1> (raw)
In-Reply-To: <DM6PR12MB4219DAB6F85B034C93EDCC86E7EC9@DM6PR12MB4219.namprd12.prod.outlook.com>
Hi Rupesh,
Thanks for working on this problem. I found a couple of nits; see
below.
On Wed, 13 Apr 2022 09:55:01 +0000
"Potharla, Rupesh via Gdb-patches" <gdb-patches@sourceware.org> wrote:
> diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
> index 49ecb199b07..c2d142ac3cc 100644
> --- a/gdb/gdbtypes.c
> +++ b/gdb/gdbtypes.c
> @@ -2398,10 +2398,12 @@ resolve_dynamic_array_or_string (struct type *type,
>
> if (rank == 0)
> {
> - /* The dynamic property list juggling below was from the original
> - patch. I don't understand what this is all about, so I've
> - commented it out for now and added the following error. */
> - error (_("failed to resolve dynamic array rank"));
> + /* Rank is zero, if a variable is passed as an argument to a
> + function. GDB considers the variable as an array so discard
> + the array type and return the target type which is of variable. */
> + TYPE_DYN_PROP(TYPE_TARGET_TYPE(type)) = TYPE_DYN_PROP(type);
> + type = TYPE_TARGET_TYPE(type);
> + return type;
> }
> else if (type->code () == TYPE_CODE_STRING && rank != 1)
> {
>
GDB's coding standard requires that things like TYPE_TARGET_TYPE(type)
be written with a space before the left paren, i.e. TYPE_TARGET_TYPE (type).
See: https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards
Also, regarding TYPE_DYN_PROP, it appears to me that this macro is no
longer being used. I've noticed that other code in gdbtypes.c is
referencing the dyn_prop_list field directly.
Kevin
next prev parent reply other threads:[~2022-04-13 18:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 9:55 Potharla, Rupesh via Gdb-patches
2022-04-13 18:27 ` Kevin Buettner via Gdb-patches [this message]
2022-04-14 10:30 ` Potharla, Rupesh via Gdb-patches
2022-04-14 21:28 ` Kevin Buettner via Gdb-patches
2022-04-15 13:33 ` Potharla, Rupesh via Gdb-patches
2022-04-15 19:31 ` Kevin Buettner via Gdb-patches
2022-04-16 18:29 ` Potharla, Rupesh via Gdb-patches
2022-04-18 13:31 ` Tom Tromey
2022-04-18 15:25 ` Potharla, Rupesh via Gdb-patches
2022-04-20 15:22 ` Andrew Burgess via Gdb-patches
2022-04-20 19:08 ` Potharla, Rupesh via Gdb-patches
2022-04-22 14:38 ` Andrew Burgess via Gdb-patches
2022-04-25 6:33 ` Potharla, Rupesh via Gdb-patches
2022-04-25 8:47 ` Andrew Burgess via Gdb-patches
2022-04-18 15:33 ` Kevin Buettner via Gdb-patches
2022-04-19 17:30 ` Kevin Buettner via Gdb-patches
2022-04-20 0:29 ` Potharla, Rupesh via Gdb-patches
2022-04-20 6:32 ` Kempke, Nils-Christian via Gdb-patches
2022-04-20 15:38 ` Kevin Buettner via Gdb-patches
2022-04-20 15:29 ` Andrew Burgess via Gdb-patches
2022-04-20 19:20 ` Potharla, Rupesh via Gdb-patches
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=20220413112753.4c6f1128@f35-zws-1 \
--to=gdb-patches@sourceware.org \
--cc=AlokKumar.Sharma@amd.com \
--cc=Hariharan.Parasuraman@amd.com \
--cc=JiniSusan.George@amd.com \
--cc=Rupesh.Potharla@amd.com \
--cc=kevinb@redhat.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