Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <lgustavo@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>,
	 "'gdb-patches@sourceware.org'" <gdb-patches@sourceware.org>,
	Yao Qi <yao@codesourcery.com>
Subject: Re: [PATCH] Refactor common/target-common into meaningful bits
Date: Mon, 05 Aug 2013 15:33:00 -0000	[thread overview]
Message-ID: <51FFC5AD.1050305@codesourcery.com> (raw)
In-Reply-To: <51FF81E6.7050006@redhat.com>

On 08/05/2013 07:43 AM, Pedro Alves wrote:
> On 08/02/2013 09:48 PM, Tom Tromey wrote:
>> Pedro> These new target-resume.h, target-wait.h, target-waitstatus.h,
>> Pedro> target-waitstatus.c files might be looked at as actually something
>> Pedro> else.  This is code defining the interface between GDB core and
>> Pedro> target_ops, and as such is used by all sort of targets on the
>> Pedro> GDB side (remote.c, etc.).  I'm not sure they should go in the same
>> Pedro> directory as the *-nat.c, etc. files.
>>
>> These seem like classic "target" bits to me.
>
> Yep.  So, if we move the classic "target" bits to a "target/"
> module directory, and put the native bits in their own dir, we
> have:
>
>   target/resume.h
>   target/waitstatus.[c|h]
>   target/wait.h
>   nat/i386-nat.c
>   nat/linux-nat.c
>   nat/linux-ptrace.c
>   nat/linux-waitpid.c
>   etc.
>
> Is this what you're thinking of?  _This_, I'm fine with.
> No mix of native bits with generic "target" bits, which was
> my main worry.
>
> It's actually very similar to something else I suggested on IRC,
> but forgot to put in email form:  "IMO, the interfaces themselves would be
> in an include dir.  e.g., gdb/include/target-waitstatus.h or some such,
> and then we'd have gdb/nat/linux-nat.c, etc."
>
> What else goes in "target/" ?  remote.c, corelow.c, etc.?
> Do we move things into subdirectories beneath it too, for better
> submodule partitioning?  I didn't want to suggest starting a
> mass move, that's easy to overdo.  (That was the point at which I
> suggested that someone thinks this through, and comes up with an
> initial design/guide of what things will look like in the end, so
> that we can then discuss and hash it out.)
>

I was checking the discussion and the above is something i had in mind, 
that is, split the generic target (as in target_ops) bits into their own 
dir and slowly move native bits to a separate "nat", "low" or "native" 
directory as well. The nat bits would deal with the system API's to do 
debugging. The target bits would be data structure and generic bits not 
directly related to the system API's.

Seems to be a bit more organized this way.


  reply	other threads:[~2013-08-05 15:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01 17:09 Luis Machado
2013-08-01 17:50 ` Tom Tromey
2013-08-01 17:52   ` Luis Machado
2013-08-02  9:29     ` Pedro Alves
2013-08-02 20:48       ` Tom Tromey
2013-08-05 10:44         ` Pedro Alves
2013-08-05 15:33           ` Luis Machado [this message]
2013-08-05 19:12           ` Tom Tromey
2013-08-05 19:21             ` Mark Kettenis
2013-08-06  8:48               ` Pedro Alves
2013-08-04 12:35       ` Yao Qi
2013-08-01 17:54   ` Pedro Alves
2013-08-16 14:49 ` Luis Machado
2013-08-17  4:01   ` Luis Machado
2013-08-19 13:45   ` Pedro Alves
2013-08-19 16:57     ` Luis Machado

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=51FFC5AD.1050305@codesourcery.com \
    --to=lgustavo@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=tromey@redhat.com \
    --cc=yao@codesourcery.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