From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7185 invoked by alias); 5 Aug 2013 19:12:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7166 invoked by uid 89); 5 Aug 2013 19:12:12 -0000 X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 05 Aug 2013 19:12:11 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r75JC1To015678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Aug 2013 15:12:02 -0400 Received: from barimba (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r75JBxp4019357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 5 Aug 2013 15:11:59 -0400 From: Tom Tromey To: Pedro Alves Cc: lgustavo@codesourcery.com, "'gdb-patches\@sourceware.org'" Subject: Re: [PATCH] Refactor common/target-common into meaningful bits References: <51FA9649.5060008@codesourcery.com> <87vc3pfghs.fsf@fleche.redhat.com> <51FAA061.4050005@codesourcery.com> <51FB7BFB.90100@redhat.com> <87txj7byz7.fsf@fleche.redhat.com> <51FF81E6.7050006@redhat.com> Date: Mon, 05 Aug 2013 19:12:00 -0000 In-Reply-To: <51FF81E6.7050006@redhat.com> (Pedro Alves's message of "Mon, 05 Aug 2013 11:43:50 +0100") Message-ID: <87bo5c7y0x.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-08/txt/msg00156.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> I've read your email several times over, and I sense that we're Pedro> talking past each other. Yeah. And thanks for your follow-up, I think it is clarifying. Pedro> Yep. So, if we move the classic "target" bits to a "target/" Pedro> module directory, and put the native bits in their own dir, we Pedro> have: Pedro> target/resume.h Pedro> target/waitstatus.[c|h] Pedro> target/wait.h Pedro> nat/i386-nat.c Pedro> nat/linux-nat.c Pedro> nat/linux-ptrace.c Pedro> nat/linux-waitpid.c Pedro> etc. Pedro> Is this what you're thinking of? _This_, I'm fine with. Yeah, this is what I think we ought to do. Pedro> It's actually very similar to something else I suggested on IRC, Pedro> but forgot to put in email form: "IMO, the interfaces themselves Pedro> would be in an include dir. e.g., Pedro> gdb/include/target-waitstatus.h or some such, and then we'd have Pedro> gdb/nat/linux-nat.c, etc." I'm usually against include dirs, but if they are near enough to the implementation it is ok by me. My issue with them is mainly forgettability -- like, I never, ever remember to look for things in src/include/gdb; and then directories like this tend to become forgotten graveyards. Pedro> What else goes in "target/" ? remote.c, corelow.c, etc.? Yes, I see the issue here; but I think it is far enough off that we should ignore it. Just merging the bits we can merge today is enough to occupy our energies. Pedro> Do we move things into subdirectories beneath it too, for better Pedro> submodule partitioning? I didn't want to suggest starting a Pedro> mass move, that's easy to overdo. Either way is fine by me. gdb-ish seems to be to prefer flatter. Pedro> (That was the point at which I Pedro> suggested that someone thinks this through, and comes up with an Pedro> initial design/guide of what things will look like in the end, so Pedro> that we can then discuss and hash it out.) If reasonably quick I think it is better to come up with a plan now, at the beginning. It doesn't have to be a perfect plan, but we're already hitting the limits of the current ("stuff it all in common/") plan. A little investment now will pay off: we won't curse ourselves in two years. Tom