From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11712 invoked by alias); 5 Jul 2011 15:14:50 -0000 Received: (qmail 11704 invoked by uid 22791); 5 Jul 2011 15:14:50 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jul 2011 15:14:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F37CC2BB314; Tue, 5 Jul 2011 11:14:35 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gI4-W2N6YBKb; Tue, 5 Jul 2011 11:14:35 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BA5372BB311; Tue, 5 Jul 2011 11:14:32 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 34A72145615; Tue, 5 Jul 2011 08:14:27 -0700 (PDT) Date: Tue, 05 Jul 2011 15:17:00 -0000 From: Joel Brobecker To: Fawzi Mohamed Cc: gdb-patches@sourceware.org, ext Tristan Gingold , Andr? P?nitz Subject: Re: [PATCH,gdb, Update1]: ensures that cie ptr of an fda is a cie Message-ID: <20110705151427.GW2407@adacore.com> References: <20110704184111.GP2407@adacore.com> <29C73230-F22F-4551-B99F-B21E6B61CCAF@nokia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29C73230-F22F-4551-B99F-B21E6B61CCAF@nokia.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2011-07/txt/msg00150.txt.bz2 > 2011-07-04 Fawzi Mohamed > > * dwarf2-frame.c (decode_frame_entry, decode_frame_entry_1): ensure > that CIE pointer of an FDE really points to a CIE Just a few more nits... (a lot of rules, I know, but we try to have a consistent development style). First, in the ChangeLog above: 2 spaces between the date and your name, and before your email address. Also, sentences always start with a capital letter, and end with a period. Thus 2011-07-04 Fawzi Mohamed * dwarf2-frame.c (decode_frame_entry, decode_frame_entry_1): Ensure that CIE pointer of an FDE really points to a CIE . > +/* defines the type of eh_frames that are expected to be decoded: CIE, FDE > + or any of them */ > +enum eh_frame_type Empty line between documentation comment and start of definition... > +{ > + eh_cie_type_id = 1<<0, > + eh_fde_type_id = 1<<1, > + eh_cie_or_fde_type_id = eh_cie_type_id + eh_fde_type_id > +}; Spaces around binary operators => `1 << 0'. > -/* Decode the next CIE or FDE. Return NULL if invalid input, otherwise > - the next byte to be processed. */ > +/* Decode the next CIE or FDE, entry type specifies the expected type. > + Return NULL if invalid input, otherwise the next byte to be processed. */ > static gdb_byte * Same here... > + /* checks that we expected a CIE */ > + gdb_assert ((entry_type & eh_cie_type_id) != 0); Same here as well. But I think you meant something like `We expect a CIE.'. -- Joel