From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20756 invoked by alias); 5 Aug 2013 15:33:16 -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 20731 invoked by uid 89); 5 Aug 2013 15:33:15 -0000 X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 05 Aug 2013 15:33:13 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1V6MmP-00060u-F1 from Luis_Gustavo@mentor.com ; Mon, 05 Aug 2013 08:33:05 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 5 Aug 2013 08:33:05 -0700 Received: from [172.30.2.167] ([172.30.2.167]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 5 Aug 2013 08:33:04 -0700 Message-ID: <51FFC5AD.1050305@codesourcery.com> Date: Mon, 05 Aug 2013 15:33:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Pedro Alves CC: Tom Tromey , "'gdb-patches@sourceware.org'" , Yao Qi 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> In-Reply-To: <51FF81E6.7050006@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00149.txt.bz2 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.