From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13945 invoked by alias); 30 Apr 2014 14:45: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 13925 invoked by uid 89); 30 Apr 2014 14:45:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Apr 2014 14:45:01 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 30 Apr 2014 07:44:59 -0700 X-ExtLoop1: 1 Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga002.jf.intel.com with ESMTP; 30 Apr 2014 07:44:58 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.70]) by IRSMSX101.ger.corp.intel.com ([169.254.1.249]) with mapi id 14.03.0123.003; Wed, 30 Apr 2014 15:44:56 +0100 From: "Agovic, Sanimir" To: 'Joel Brobecker' , Siva Chandra CC: gdb-patches Subject: RE: [PATCH] Remove unused arguments to few functions in dwarf2loc.c and gdbtypes.c. Date: Wed, 30 Apr 2014 14:45:00 -0000 Message-ID: <0377C58828D86C4588AEEC42FC3B85A71D868FBE@IRSMSX105.ger.corp.intel.com> References: <20140429141520.GD4420@adacore.com> In-Reply-To: <20140429141520.GD4420@adacore.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00641.txt.bz2 > > I did some digging as to why the unused args could be useful at all. > > For example, one function touched by the attached patch is > > dwarf2loc:dwarf2_evaluate_property. Before this patch, this function > > required an (eventually) unused argument of type CORE_ADDR. I think > > the intention there was correct: A dynamic property is probably > > embedded in the value and hence the value address is required to > > evaluate it. However, the patch that added this function added c99 vla > > support. I think the array lengths for VLAs are not embedded in the > > (array) object but somewhere else (the stack frame for example). > > Hence, the value address is not required. Am I missing something > > here? >=20 Indeed. As you described the parameter is used to pass the address of the o= bject=20 currently evaluated. The opcode DW_OP_push_object_address consumes the addr= ess. I decided to extract the implementation of the mentioned opcode and=20 DW_AT_data_location into two separate patches so ease reviewing, as they ar= e not specific to C99-vla. Looks like I forgot to remove the bit while refactorin= g. Thanks for taking care! The two pending patches will be send to the ML next= week. -Sanimir Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052