From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by sourceware.org (Postfix) with ESMTPS id A2167386F82D for ; Fri, 1 May 2020 21:10:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A2167386F82D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x443.google.com with SMTP id x17so13044238wrt.5 for ; Fri, 01 May 2020 14:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=VlED8M5p6tJ3Q0jwPimTFIE1LGhNOcFHQfmZFIUGjpc=; b=IcQkapRV35vzm1cJJQyURzTbtxCjuIYyb98OhOpUG/RenIOIXM9nCIRyG6PZo5A/zy DSNVzBy03ZMyFX4JIqFuusGpT19o6eJo6xJ88ksQe28kGrB27GFJex4VdBdhmqtGNOgd fu4r2bjgY1sFPGAPDckORyGIZSfJGSYdrugtDLgO+eav2MiBqspzToqB114+kSk763j7 TiRzNh8ywioscvm4/eMZxjmq1BqjWxy21BU1chtifGQW39GjllOLKS/IMSAjsaZz6H1n HiOF1/c4ADcx3/f922s3Xp7j4nkt+CtoHXEoJVIkd9zkXd1EQw2BrMpfB1YoER2ubNfP 4PEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=VlED8M5p6tJ3Q0jwPimTFIE1LGhNOcFHQfmZFIUGjpc=; b=RSFbzzQhm8EaEco/zM3mvV0VseoGr+FL0ibcfWO1UQha7sDgT1deCWQ1wa+VJ07Ee/ Wl9SGmjyd6sPyPe82CK6pdkAHa6LOAcjkv+As2ZFgSxDgi1m7CfwbwzUNE09KrNj+Prt lRhv2y2kb8EjDtTA2+IXmDS600yaHNeRERDclQInhqiqTcgUN9mrg2kqDtROkLwRKtW8 qpqnkh8JCLD/2Bz+hNJmzxqburckTMu3QAXSTlZ4WKg9yAxE3RAlefd6l+mvE7O9Z0r8 v2gDyzLzRwmQepaYG/l6p2VC0WtSGuKnbaSR96sDuAZnGNqdwtuam+gkARRIKM19JRH9 pN8w== X-Gm-Message-State: AGi0PubSHKZIx6x14laJKZAqsuM2hAcCmP3GubtjXi8laJdYj9gyWxK4 S449s/VvSyEAEgHB4f0qj8NzH4tccds= X-Google-Smtp-Source: APiQypJUKiRPydRPl7Hn1liJ7Jb+Je9G14AmNnGjXntmP42UaK2NxFh4MzdnB9dg/VsLbwWy9kWnRQ== X-Received: by 2002:adf:a18c:: with SMTP id u12mr5876452wru.325.1588367455749; Fri, 01 May 2020 14:10:55 -0700 (PDT) Received: from localhost (host81-151-181-184.range81-151.btcentralplus.com. [81.151.181.184]) by smtp.gmail.com with ESMTPSA id o6sm6403110wrw.63.2020.05.01.14.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2020 14:10:54 -0700 (PDT) Date: Fri, 1 May 2020 22:10:53 +0100 From: Andrew Burgess To: Hannes Domani Cc: Gdb-patches Subject: Re: [PATCH] Fix size recalculation of fortran arrays Message-ID: <20200501211053.GO3522@embecosm.com> References: <20200501123518.5907-1-ssbssa.ref@yahoo.de> <20200501123518.5907-1-ssbssa@yahoo.de> <20200501131136.GN3522@embecosm.com> <1114253616.574993.1588340771580@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1114253616.574993.1588340771580@mail.yahoo.com> X-Operating-System: Linux/5.5.17-200.fc31.x86_64 (x86_64) X-Uptime: 22:05:50 up 11 days, 7:35, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-26.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2020 21:10:58 -0000 * Hannes Domani via Gdb-patches [2020-05-01 13= :46:11 +0000]: > Am Freitag, 1. Mai 2020, 15:11:40 MESZ hat Andrew Burgess Folgendes geschrieben: >=20 > > * Hannes Domani via Gdb-patches [2020-05-0= 1 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 in= to > > > 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=A0 Hannes Domani=A0 > > > > > >=A0=A0=A0=A0 * gdbtypes.c (calculate_static_array_size): New function. > > >=A0=A0=A0=A0 (create_array_type_with_stride): Use calculate_static_arr= ay_size. > > >=A0=A0=A0=A0 (check_typedef): Likewise. > > > --- > > >=A0 gdb/gdbtypes.c | 130 ++++++++++++++++++++++++++-------------------= ---- > > >=A0 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) > > >=A0=A0=A0=A0=A0 } > > >=A0 } > > > > > > +/* If the array has static bounds, calculate its size.=A0 */ > > > + > > > +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: > > > >=A0=A0 /* If the array TYPE has static bounds calculate and update its > >=A0=A0=A0=A0 size, then return true.=A0 Otherwise return false and leave= TYPE > >=A0=A0=A0=A0 unchanged.=A0 */ > > > > With those changes this looks good. >=20 > Pushed with those changes, thanks. >=20 >=20 > > Thanks for the quick fix. >=20 > 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 ev= en > 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