From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24059 invoked by alias); 7 Feb 2014 12:27:51 -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 24046 invoked by uid 89); 7 Feb 2014 12:27:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 X-HELO: mga03.intel.com Received: from mga03.intel.com (HELO mga03.intel.com) (143.182.124.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Feb 2014 12:27:50 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga101.ch.intel.com with ESMTP; 07 Feb 2014 04:27:47 -0800 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga001.fm.intel.com with ESMTP; 07 Feb 2014 04:27:28 -0800 Received: from irsmsx106.ger.corp.intel.com (163.33.3.31) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 7 Feb 2014 12:27:27 +0000 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.202]) by IRSMSX106.ger.corp.intel.com ([169.254.8.96]) with mapi id 14.03.0123.003; Fri, 7 Feb 2014 12:27:25 +0000 From: "Agovic, Sanimir" To: 'Joel Brobecker' CC: "tromey@redhat.com" , "Boell, Keven" , "gdb-patches@sourceware.org" Subject: RE: [PATCH v5 09/15] vla: resolve dynamic bounds if value contents is a constant byte-sequence Date: Fri, 07 Feb 2014 12:27:00 -0000 Message-ID: <0377C58828D86C4588AEEC42FC3B85A7176F9D99@IRSMSX105.ger.corp.intel.com> References: <1391704056-25246-1-git-send-email-sanimir.agovic@intel.com> <1391704056-25246-10-git-send-email-sanimir.agovic@intel.com> <20140207102715.GF5485@adacore.com> In-Reply-To: <20140207102715.GF5485@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-02/txt/msg00194.txt.bz2 Thanks for your review. The inlined diff below wraps the single statement + comment within curly br= aces. diff --git a/gdb/findvar.c b/gdb/findvar.c index a543dc4..11ce3c6 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -469,8 +469,10 @@ default_read_var_value (struct symbol *var, struct fra= me_info *frame) case LOC_CONST_BYTES: if (is_dynamic_type (type)) - /* Value is a constant byte-sequence and needs no memory access. */ - type =3D resolve_dynamic_type (type, /* Unused address. */ 0); + { + /* Value is a constant byte-sequence and needs no memory access. = */ + type =3D resolve_dynamic_type (type, /* Unused address. */ 0); + } v =3D allocate_value (type); memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var), TYPE_LENGTH (type)); -Sanimir > -----Original Message----- > From: Joel Brobecker [mailto:brobecker@adacore.com] > Sent: Friday, February 07, 2014 11:27 AM > To: Agovic, Sanimir > Cc: tromey@redhat.com; Boell, Keven; gdb-patches@sourceware.org > Subject: Re: [PATCH v5 09/15] vla: resolve dynamic bounds if value conten= ts is a constant > byte-sequence >=20 > Hello! >=20 > > 2013-11-26 Sanimir Agovic > > Keven Boell > > > > * findvar.c (default_read_var_value): Resolve dynamic bounds if locati= on > > points to a constant blob. >=20 > Small trivial comment.... >=20 > > case LOC_CONST_BYTES: > > + if (is_dynamic_type (type)) > > + /* Value is a constant byte-sequence and needs no memory access. */ > > + type =3D resolve_dynamic_type (type, /* Unused address. */ 0); >=20 > Although not required by C, we prefer in the GDB project to still > use curly braces around the if block. The reason is that the comment > visually looks like a statement, so it looks like the if block as > more than one statement, hence the use of curly braces... >=20 > Thank you! >=20 > -- > Joel 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