[PATCH] Move arch/tdesc.h to common/common-tdesc.h

Yao Qi qiyaoltc@gmail.com
Tue Feb 6 21:24:00 GMT 2018


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.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list