This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH RFA] gdbserver/low-linux.c changes for IA-64

On Mar 20,  4:56pm, Stan Shebs wrote:

> This looks fine to check in, with one exception as noted below:
> > +initialize_arch()
> > +{
> > +  return;
> Presumably this is redundant and can be omitted.

I assume you're referring to the return statement, right?  At first I
thought you were referring to the entire function.  (Note that
initialize_arch() actually does something useful for linux/ia32.)

I guess it's a matter of style, but I wrote it with an explicit return
statement to indicate that it really is supposed to do nothing but
return.  Otherwise, you might be left wondering if the author of this
function simply forgot to finish implementing it.  (Though,
personally, I usually put a /* FIXME: Implement. */ comment into
such stubs.)

> (It would be nice
> to have a void (void) decl glued on too, but not crucial.)

I've placed the following declaration near the top of the file:

static void initialize_arch (void);

With regard to the actual definition, I've also added ``static void''
to match the other definitions of initialize_arch() in this file.  Now
it looks like this:

static void
initialize_arch ()

I can remove the return statement too if you really find it

Thanks for the quick response.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]