From: Paul Gilliam <pgilliam@us.ibm.com>
To: gdb-patches@sources.redhat.com
Cc: Daniel Jacobowitz <drow@false.org>, Jim Blandy <jimb@redhat.com>
Subject: Re: fix "too much information" bug w/ "info vector" on PowerPC
Date: Fri, 02 Sep 2005 14:26:00 -0000 [thread overview]
Message-ID: <200509020725.39063.pgilliam@us.ibm.com> (raw)
In-Reply-To: <20050902005525.GA30315@nevyn.them.org>
On Thursday 01 September 2005 17:55, Daniel Jacobowitz wrote:
> On Thu, Sep 01, 2005 at 04:06:08PM -0700, Jim Blandy wrote:
> > Paul Gilliam <pgilliam@us.ibm.com> writes:
> >
> > > Talking about spaces, tabs, and formatting, I noticed that some of the function prototypes in ppc-tdep.h are over 80 columns and
> > > real ugly.
> > >
> > > Here, for your consideration, are two patches to change that: one uses a short-lived macro (ppc-tdep.patch) and the other uses a
> > > typedef (newest.patch).
> >
> > If I were to use a typedef, I'd put it in gdbarch.h and call it
> > gdb_retval_convention_t; there's nothing special about ppc-tdep.h's
> > needs.
> >
> > The following is also legal C, Emacs-friendly, and gdb_indent.sh-friendly:
> >
> > enum return_value_convention (ppc_sysv_abi_return_value
> > (struct gdbarch *gdbarch,
> > struct type *valtype,
> > struct regcache *regcache,
> > gdb_byte *readbuf,
> > const gdb_byte *writebuf));
> >
> > I used this once before, but Mark Kettenis declared it "weird" or
> > something and asked me to take it out. :) Be that as it may, I think
> > it's better than the macro or the local typedef.
>
> It is weird :-P
>
> What's so wrong with
>
> enum return_value_convention ppc_sysv_abi_return_value
> (struct gdbarch *, struct type *, struct regcache *,
> gdb_byte *, const gdb_byte *);
>
I noticed this style in other files:
enum return_value_convention
ppc_sysv_abi_return_value (
struct gdbarch *,struct type *, struct regcache *,
gdb_byte *, const gdb_byte *);
Which has the advantage of being able to search for the name with /^name/,
for those who don't have 'ctabs' or 'etabs' :-) And for those compulsive commenters:
enum return_value_convention
ppc_sysv_abi_return_value (
struct gdbarch *, /* Silly comment about this argument */
struct type *, /* Silly comment about this argument */
struct regcache *, /* Silly comment about this argument */
gdb_byte *, /* Silly comment about this argument */
const gdb_byte *); /* Silly comment about this argument */
which realy works best on a definition, rather than a declartation.
If someone wanted too, they could spend years trying to make the source consistant, not to
mention how disruptive it would be to on-going development/support.
next prev parent reply other threads:[~2005-09-02 14:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-30 21:44 Paul Gilliam
2005-08-30 21:46 ` Jim Blandy
2005-08-30 22:24 ` Daniel Jacobowitz
2005-08-30 22:30 ` Jim Blandy
2005-08-30 22:44 ` Daniel Jacobowitz
2005-08-30 23:50 ` Jim Blandy
2005-08-30 22:46 ` Stan Shebs
2005-08-30 23:36 ` Mark Kettenis
2005-08-31 7:52 ` Jim Blandy
2005-08-31 20:30 ` Paul Gilliam
2005-08-31 20:48 ` Jim Blandy
2005-08-31 20:48 ` Daniel Jacobowitz
2005-09-01 0:30 ` Paul Gilliam
2005-09-01 23:07 ` Jim Blandy
2005-09-02 0:55 ` Daniel Jacobowitz
2005-09-02 14:26 ` Paul Gilliam [this message]
2005-09-06 18:14 ` Jim Blandy
2005-09-06 18:21 ` Daniel Jacobowitz
2005-09-01 18:12 ` [commit] " Paul Gilliam
2005-08-31 20:26 ` Kevin Buettner
2005-08-31 20:32 ` Paul Gilliam
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=200509020725.39063.pgilliam@us.ibm.com \
--to=pgilliam@us.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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