From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jan.kratochvil@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [obv] Indent prototypes so they do not get into tags
Date: Sun, 24 Jul 2011 20:26:00 -0000 [thread overview]
Message-ID: <201107241816.p6OIGWPv015180@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20110723174225.GA19820@host1.jankratochvil.net> (message from Jan Kratochvil on Sat, 23 Jul 2011 19:42:25 +0200)
> Date: Sat, 23 Jul 2011 19:42:25 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> 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.
prev parent reply other threads:[~2011-07-24 18:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 15:58 Jan Kratochvil
2011-07-23 18:38 ` Mark Kettenis
2011-07-23 18:43 ` Jan Kratochvil
2011-07-24 20:26 ` Mark Kettenis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201107241816.p6OIGWPv015180@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox