This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Move arch/tdesc.h to common/common-tdesc.h
- From: Philipp Rudo <prudo at linux dot vnet dot ibm dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: Alan Hayward <Alan dot Hayward at arm dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Wed, 7 Feb 2018 10:02:02 +0100
- Subject: Re: [PATCH] Move arch/tdesc.h to common/common-tdesc.h
- Authentication-results: sourceware.org; auth=none
- References: <97948063-b3db-fd3a-f62e-b552935cb8dd@arm.com> <20180201121443.43322674@ThinkPad> <59984094-96C1-4D84-89F6-384769471005@arm.com> <86k1vqjd5s.fsf@gmail.com> <20180206185609.3219ef39@ThinkPad> <CAH=s-PM7bROc06Vf85ZRoWykEiL+N4r1dDf_bpsJ6HVLaAux7A@mail.gmail.com>
Hi Yao,
sorry, i misunderstood you. You are right cleaning up gdbservers Makefile
would be better. I'm currently pretty occupied, but I can give it a try later
on. Let's see what I can do.
Philipp
On Tue, 6 Feb 2018 21:24:35 +0000
Yao Qi <qiyaoltc@gmail.com> wrote:
> On Tue, Feb 6, 2018 at 5:56 PM, Philipp Rudo <prudo@linux.vnet.ibm.com> wrote:
> > Of course you could name the *.h file anything you want. But from my point of
> > view the *.c and *.h files belonging together should have the same name.
> > Having this in mind you cannot call it common/tdesc.h because in
> > gdbserver/Makefile:OBS the directory is ignored and both (common/tdesc.c and
> > gdbserver/tdec.c) would be compiled to tdesc.o, (most likely) leading to
> > unintended behavior.
>
> What I want is to compile gdbserver/tdesc.c to tdesc.o, common/tdesc.c to
> common/tdesc.o in gdbserver build directory.
>
> >
> >> > My next set of patches will then add common/tdesc.c.
> >> > This is slightly more tricky because we now build two tdesc.o files.
> >>
> >> I am inclined to create common/ directory in gdb and gdbserver build
> >> tree, and put the object files in the right directory.
> >
> > Yao, what do you mean with this? There already is a common/ directory with
> > code shared by gdb and gdbserver. The thing is that tdesc.h was in arch/ not
> > in common/. Alan, Omair (if I recall right) and I agreed that it would be
> > better to move it to common/ because arch/ should only contain architecture
> > specific code. Or am I understanding you wrong?
> >
>
> It is build tree, instead of source tree. What I want is to have common/ in gdb
> and gdbserver build directory respectively. I am not against moving
> arch/tdesc.h
> to common/tdesc.h.
>