From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3932 invoked by alias); 2 Aug 2013 20:48:56 -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 3923 invoked by uid 89); 2 Aug 2013 20:48:56 -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; Fri, 02 Aug 2013 20:48:56 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r72Kmle2019210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Aug 2013 16:48:48 -0400 Received: from barimba (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r72Kmjtb005443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 2 Aug 2013 16:48:46 -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> Date: Fri, 02 Aug 2013 20:48:00 -0000 In-Reply-To: <51FB7BFB.90100@redhat.com> (Pedro Alves's message of "Fri, 02 Aug 2013 10:29:31 +0100") Message-ID: <87txj7byz7.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/msg00120.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> "target" is an overloaded word in GDB-speak. My idea for this new Pedro> directory, would be for it to hold the native target backend bits. Pedro> But "target" could also suggest that corelow.c, file.c, remote.c, etc. Pedro> should be put in this directory, while I don't think they should. I've been thinking about this a bit since the discussion yesterday. I think I'm generally in favor of using the names Luis already has. The basic reason I have is that I think that, by and large, gdb's module boundaries make sense. I may quibble with some exact lines that have been drawn (and certainly I dislike the insides of some modules), but by and large the modules, at least as I understand the breakdown, have proven resilient. I agree that "target" is not the best possible name de novo. However, it is the nature of language to overload words with meanings -- the norm, not the exception -- and furthermore "target" is the name historically chosen inside gdb to represent the connection between the core (+ CLI) and the back end. You had a few specific issues, which I've quoted & will address below. Pedro> Sounds like a better name for this native target backend directory Pedro> should be invented. GDB uses *-nat.c naming for most of Pedro> these files, while GDBserver uses *-low.c. I think it's fine to use "nat" in the same way that gdb does now. Looking at the current patch, though, I don't see anything "nat" in there. The ptrace options discovery bits could go there, but that wasn't addressed in this thread IIRC. 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. Pedro> In a world where we fuse gdb's and gdbserver's target backends, it's Pedro> not clear to me at this point whether we'll end up with only one Pedro> "struct target_ops" That's ok though. We can use subclassing. We will need to come up with new names, but it seems premature to worry about that. Tom