[PATCH 10/11 v5] Remove GDBSERVER uses from i386-dregs.c

Gary Benson gbenson@redhat.com
Thu Aug 7 12:28:00 GMT 2014


Doug Evans wrote:
> Gary Benson writes:
> > -#ifndef GDBSERVER
> >  /* Whether or not to print the mirrored debug registers.  */
> >  extern int debug_hw_points;
> > -#endif
> 
> Since externs should live in headers, and since this is a cleanup
> patch, can I impose on you a request to move debug_hw_points to a
> header.  Seems like i386-dregs.h is the best place.
> 
> The variable could even arguably be defined in i386-dregs.c, though
> I'm not sure if/how people would want i386-nat.c to change.  Plus
> add x86 or some such to the variable's name.  I'd leave this part to
> another pass.

i386-dregs doesn't work for debug_hw_points, as it's also used by
the aarch64-linux code.  It's handled fairly messily at present
(it's global in gdbserver, in server.[ch], but local to some ports
in GDB) which I guess I why I left it why it was when I did the
i386-dregs work.

Since it's global in gdbserver it probably should just be global.
I'll move the extern to common-debug.h, and the definition to
common-debug.c.

Thanks,
Gary

-- 
http://gbenson.net/



More information about the Gdb-patches mailing list