Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Philipp Rudo <prudo@linux.vnet.ibm.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Alan Hayward <Alan.Hayward@arm.com>,
	       "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>,
	       nd <nd@arm.com>
Subject: Re: [PATCH] Move arch/tdesc.h to common/common-tdesc.h
Date: Tue, 06 Feb 2018 17:56:00 -0000	[thread overview]
Message-ID: <20180206185609.3219ef39@ThinkPad> (raw)
In-Reply-To: <86k1vqjd5s.fsf@gmail.com>

Hi Yao,

On Tue, 06 Feb 2018 16:28:15 +0000
Yao Qi <qiyaoltc@gmail.com> wrote:

> Alan Hayward <Alan.Hayward@arm.com> writes:
> 
> > That results in common/tdesc.h and gdbserver/tdesc.h
> > That’s not a problem by itself, because we can just prefix the dir
> > name as part of the include.
> >  
> 
> I don't see how does the name of *.c file affect the name of *.h file.
> We can still use common/tdesc.h no matter what the *.c name is.

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.
 
> > 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?

Philipp

> > The gdbserver IPA rules will need tweaking, and I’m not sure the OBS
> > list will work as it is (given it doesn’t have any dir names).
> >
> > Like you, I wasn’t sure if there was a naming convention for common/.
> > In the end I went with the easiest solution :)  
> 


  reply	other threads:[~2018-02-06 17:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 13:40 Alan Hayward
2018-02-01 11:19 ` Philipp Rudo
2018-02-01 13:19   ` Alan Hayward
2018-02-06 16:28     ` Yao Qi
2018-02-06 17:56       ` Philipp Rudo [this message]
2018-02-06 21:24         ` Yao Qi
2018-02-07  9:02           ` Philipp Rudo
2018-02-07  9:32             ` Yao Qi
2018-02-07 10:31               ` Alan Hayward
2018-02-20 11:56                 ` Alan Hayward
2018-02-21 12:27                   ` Philipp Rudo
2018-02-22 14:17                   ` Yao Qi
2018-02-27 12:13                   ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180206185609.3219ef39@ThinkPad \
    --to=prudo@linux.vnet.ibm.com \
    --cc=Alan.Hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.com \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox