From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31817 invoked by alias); 21 Jul 2014 08:25:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 31233 invoked by uid 89); 21 Jul 2014 08:24:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Jul 2014 08:24:55 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 21 Jul 2014 01:24:53 -0700 X-ExtLoop1: 1 Received: from kboell-mobl2.ger.corp.intel.com (HELO [172.28.205.55]) ([172.28.205.55]) by fmsmga002.fm.intel.com with ESMTP; 21 Jul 2014 01:24:49 -0700 Message-ID: <53CCCE51.1030603@linux.intel.com> Date: Mon, 21 Jul 2014 13:23:00 -0000 From: Keven Boell User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Jan Kratochvil , Keven Boell CC: gdb-patches@sourceware.org, sanimir.agovic@intel.com Subject: Re: [V2 09/23] vla: changed string length semantic. References: <1405070495-6948-1-git-send-email-keven.boell@intel.com> <1405070495-6948-10-git-send-email-keven.boell@intel.com> <20140718151945.GA11512@host2.jankratochvil.net> In-Reply-To: <20140718151945.GA11512@host2.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00537.txt.bz2 On 18.07.2014 17:19, Jan Kratochvil wrote: > Hi Keven, > > the regression discussed in > Re: [V2 00/23] Fortran dynamic array support > https://sourceware.org/ml/gdb-patches/2014-07/msg00278.html > > is IMO here: > > On Fri, 11 Jul 2014 11:21:21 +0200, Keven Boell wrote: >> @@ -14590,8 +14680,26 @@ attr_to_dynamic_prop (const struct attribute *attr, struct die_info *die, >> baton = obstack_alloc (obstack, sizeof (*baton)); >> baton->referenced_type = die_type (target_die, target_cu); >> baton->locexpr.per_cu = cu->per_cu; >> - baton->locexpr.size = DW_BLOCK (target_attr)->size; >> - baton->locexpr.data = DW_BLOCK (target_attr)->data; >> + >> + if (additional_data != NULL && additional_data_size > 0) >> + { >> + gdb_byte *data; >> + >> + data = obstack_alloc (&cu->objfile->objfile_obstack, >> + DW_BLOCK (attr)->size + additional_data_size); >> + memcpy (data, DW_BLOCK (attr)->data, DW_BLOCK (attr)->size); >> + memcpy (data + DW_BLOCK (attr)->size, >> + additional_data, additional_data_size); >> + >> + baton->locexpr.data = data; >> + baton->locexpr.size = DW_BLOCK (attr)->size + additional_data_size; >> + } >> + else >> + { >> + baton->locexpr.data = DW_BLOCK (attr)->data; >> + baton->locexpr.size = DW_BLOCK (attr)->size; >> + } >> + >> prop->data.baton = baton; >> prop->kind = PROP_LOCEXPR; >> gdb_assert (prop->data.baton != NULL); > > it was correctly using 'target_attr' but now it uses 'attr' instead. > > The gdb.ada/ regression gets fixed for me by the attached patch. > Thanks for your investigation. Seems like I did a copy and paste error here, you are right, target_attr is the right variable to use in this case. I pushed the updated series to Github: https://github.com/intel-gdb/vla/tree/vla-fortran > > Jan > Thanks, Keven