From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17185 invoked by alias); 24 Jul 2011 18:16:53 -0000 Received: (qmail 17177 invoked by uid 22791); 24 Jul 2011 18:16:53 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 Jul 2011 18:16:40 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p6OIGYhJ020916; Sun, 24 Jul 2011 20:16:34 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p6OIGWPv015180; Sun, 24 Jul 2011 20:16:32 +0200 (CEST) Date: Sun, 24 Jul 2011 20:26:00 -0000 Message-Id: <201107241816.p6OIGWPv015180@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: jan.kratochvil@redhat.com CC: gdb-patches@sourceware.org In-reply-to: <20110723174225.GA19820@host1.jankratochvil.net> (message from Jan Kratochvil on Sat, 23 Jul 2011 19:42:25 +0200) Subject: Re: [obv] Indent prototypes so they do not get into tags References: <20110713151946.GA12824@host1.jankratochvil.net> <201107231714.p6NHEB3T024856@glazunov.sibelius.xs4all.nl> <20110723174225.GA19820@host1.jankratochvil.net> 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/msg00676.txt.bz2 > Date: Sat, 23 Jul 2011 19:42:25 +0200 > From: Jan Kratochvil > > On Sat, 23 Jul 2011 19:14:11 +0200, Mark Kettenis wrote: > > > -static struct value * > > > -dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, > > > - const gdb_byte *data, unsigned short size, > > > - struct dwarf2_per_cu_data *per_cu, > > > - LONGEST byte_offset); > > > +static struct value *dwarf2_evaluate_loc_desc_full (struct type *type, > > > + struct frame_info *frame, > > > + const gdb_byte *data, > > > + unsigned short size, > > > + struct dwarf2_per_cu_data *per_cu, > > > + LONGEST byte_offset); > > > > Bleah, that last one really becomes unreadable this way. Isn't there > > a better way to this by bending the GNU coding style rules slightly in > > a different way? > > A agree it is ugly. GNU indent according to GCS (GNU Coding Standards): > > static struct value *dwarf2_evaluate_loc_desc_full (struct type *type, > struct frame_info *frame, > const gdb_byte * data, > unsigned short size, > struct dwarf2_per_cu_data > *per_cu, > LONGEST byte_offset); > > The other usual possibilitiesone can find in GDB sources are: > > static struct value * > dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, > const gdb_byte *data, unsigned short size, > struct dwarf2_per_cu_data *per_cu, > LONGEST byte_offset); I think this is by far the most readable one. I even think there was some sort of consensus among GDB developers about using this style some years ago. > or: > static struct value *dwarf2_evaluate_loc_desc_full > (struct type *type, struct frame_info *frame, const gdb_byte *data, > unsigned short size, struct dwarf2_per_cu_data *per_cu, LONGEST byte_offset); > > I really do not mind which one, as long as > dwarf2_evaluate_loc_desc_full is not in tags, none of the > possibilities look as a clear win to me.