From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Hannes Domani <ssbssa@yahoo.de>
Cc: Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix size recalculation of fortran arrays
Date: Fri, 1 May 2020 22:10:53 +0100 [thread overview]
Message-ID: <20200501211053.GO3522@embecosm.com> (raw)
In-Reply-To: <1114253616.574993.1588340771580@mail.yahoo.com>
* Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> [2020-05-01 13:46:11 +0000]:
> Am Freitag, 1. Mai 2020, 15:11:40 MESZ hat Andrew Burgess <andrew.burgess@embecosm.com> Folgendes geschrieben:
>
> > * Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> [2020-05-01 14:35:18 +0200]:
> >
> > > My recent change regarding size calculation of arrays of stubbed types
> > > didn't take array strides and associated/allocated type properties into
> > > account, which basically broke fortran arrays.
> > >
> > > Fixed by refactoring the array size calculation of
> > > create_array_type_with_stride into a new function, and also use it for
> > > the stubbed array size recalculation.
> > >
> > > gdb/ChangeLog:
> > >
> > > 2020-05-01 Hannes Domani <ssbssa@yahoo.de>
> > >
> > > * gdbtypes.c (calculate_static_array_size): New function.
> > > (create_array_type_with_stride): Use calculate_static_array_size.
> > > (check_typedef): Likewise.
> > > ---
> > > gdb/gdbtypes.c | 130 ++++++++++++++++++++++++++-----------------------
> > > 1 file changed, 68 insertions(+), 62 deletions(-)
> > >
> > > diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
> > > index 6648dc4d67..ad5c7ee0af 100644
> > > --- a/gdb/gdbtypes.c
> > > +++ b/gdb/gdbtypes.c
> > > @@ -1177,6 +1177,62 @@ discrete_position (struct type *type, LONGEST val, LONGEST *pos)
> > > }
> > > }
> > >
> > > +/* If the array has static bounds, calculate its size. */
> > > +
> > > +static bool
> > > +calculate_static_array_size (struct type *type)
> >
> > Could you rename this to something like update_static_array_size -
> > calculate to me implies something will be calculated and returned.
> > Also please update the header comment to reference TYPE, and describe
> > the return values, something like:
> >
> > /* If the array TYPE has static bounds calculate and update its
> > size, then return true. Otherwise return false and leave TYPE
> > unchanged. */
> >
> > With those changes this looks good.
>
> Pushed with those changes, thanks.
>
>
> > Thanks for the quick fix.
>
> I'm very sorry for the breakage, but running the testsuite on Windows can
> be very frustrating at times.
> Maybe I'm doing something wrong, but each test only has ~66% chance of even
> staring correctly.
I feel your pain. Any time I have to do anything on Windows I know
I'm going to have a bad day.
It can be worth mentioning in your mailing list post if you are
worried that your testing might not have gone well, most reviewers
will be happy to apply a patch locally and do a test run to double
check.
Thanks,
Andrew
prev parent reply other threads:[~2020-05-01 21:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200501123518.5907-1-ssbssa.ref@yahoo.de>
2020-05-01 12:35 ` Hannes Domani
2020-05-01 13:11 ` Andrew Burgess
2020-05-01 13:46 ` Hannes Domani
2020-05-01 21:10 ` Andrew Burgess [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=20200501211053.GO3522@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.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