[patch] Move common macros to i386-common.h

Mark Kettenis mark.kettenis@xs4all.nl
Wed Feb 23 21:35:00 GMT 2011


> Date: Wed, 23 Feb 2011 13:26:33 +0800
> From: Yao Qi <yao@codesourcery.com>
> 
> On 02/13/2011 09:40 PM, Mark Kettenis wrote:
> > I'm just back from a 3+-week holiday.  I'm not buying into the "share more
> > stuff between gdb and gdbserver" mantra yet.  Please hold off on this
> > until
> > I've gotten caught up with my mail and had a chance to think about all this.
> 
> Mark,
> Do you ever have a change to look at this patch?  I am inclined to
> rename i386-common.h to i386-dbg-reg.h, since it is really about debug
> registers.

OK, here we go.  I don't have an issue with this diff per-se, but more
with the direction this is going.  A long time ago, gdb and gdbserver
shared a lot of code.  The gdbserver code could only be built on a
limited set of platforms though.  As a result gdbserver builds ended
up being broken often because of changes made to only gdb.  That's one
of the reasons why we split the two codebases.  Now, years later,
people are moving in the other direction again, and I'm worried it
will bring back the problems we had in the past.

I'm particularly worried about changes I'll make myself.  My primary
development platform is OpenBSD which isn't supported by gdbserver.
So I won't be building the gdbserver code, so I won't notice any
problems my diffs (and other people's diffs) will introduce in
gdbserver.

Sharing architecture-specific #define's is probably fine.  Sharing
some simple basec support functions may also be ok.  But I don't think
sharing more complicated code (such as the code manipulating the i386
debug registers) is a good idea.

Mark



More information about the Gdb-patches mailing list