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

Kevin Buettner kevinb@cygnus.com
Sat Apr 1 00:00:00 GMT 2000


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 ()
{
  return;
}

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

Thanks for the quick response.

Kevin


More information about the Gdb-patches mailing list