[COMMIT] Re: [PATCH 0/9][gdbserver] Split server.h.
Pedro Alves
palves@redhat.com
Thu Sep 5 20:47:00 GMT 2013
On 09/03/2013 09:26 PM, Pedro Alves wrote:
> The recurring theme of doing:
>
> #ifdef GDBSERVER
> #include "server.h"
> #else
> #include "defs.h"
> #endif
>
> in common/ code is a bit annoying. I think we'll end up proving a
> defs.h in gdbserver, and we'll want to share as much with gdb's as
> possible.
>
> I considered just renaming server.h to defs.h, but looking at
> server.h, I think it's better to first split out things that don't
> really need to be there. Now that gdbserver's Makefile does automatic
> dependency tracking, it's easy enough to split the parts that actually
> define interfaces of specific modules to their own files. This series
> does that. Some of the new headers remain included in server.h (at
> least for now), for they define things that are truly used throughout
> the code, and I was hating the fact that I was ending up adding
> #include remote-utils.h throughout in a previous attempt, with "utils"
> being yet another kitchensink, which I prefer avoiding. Still, I
> think it still makes things clearer this way.
>
> I think we should do the same on the gdb side too.
>
> Tested on x86_64 Fedora 17. I'll apply it tomorrow, barring comments.
I remembered to try cross building gdbserver for mingw, and that showed
a couple problems. I fixed them, and pushed the series in. I'll send
the final versions of the patches that needed adjustments.
--
Pedro Alves
More information about the Gdb-patches
mailing list