From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8817 invoked by alias); 16 Dec 2013 21:21: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 8805 invoked by uid 89); 16 Dec 2013 21:21:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Dec 2013 21:21:14 +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 rBGLLDZl032118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 16 Dec 2013 16:21:13 -0500 Received: from barimba (ovpn-113-93.phx2.redhat.com [10.3.113.93]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBGLLBOH027001 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 16 Dec 2013 16:21:12 -0500 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v4 3/9] add target method delegation References: <1382464769-2465-1-git-send-email-tromey@redhat.com> <1382464769-2465-4-git-send-email-tromey@redhat.com> <526E8B54.8040104@redhat.com> <87eh75cmig.fsf@fleche.redhat.com> <87a9htcme3.fsf@fleche.redhat.com> <87habz7q6g.fsf@fleche.redhat.com> <527D1A84.9040106@redhat.com> <87lhzr11wz.fsf@fleche.redhat.com> <87a9g623cw.fsf@fleche.redhat.com> <871u1gz9q2.fsf@fleche.redhat.com> <52AEFB0A.3090104@redhat.com> Date: Mon, 16 Dec 2013 21:21:00 -0000 In-Reply-To: <52AEFB0A.3090104@redhat.com> (Pedro Alves's message of "Mon, 16 Dec 2013 13:07:22 +0000") Message-ID: <87r49cpk54.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-12/txt/msg00603.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: >> 3. de_fault will be completely eliminated. INHERIT will be limited to >> the smallest possible list of fields, like to_shortname. Nearly >> every current_target method will simply delegate. Pedro> Sounds like the squashed target will end up mostly unused? It sounds Pedro> to me that even for those (data fields) we wouldn't need INHERIT. As Pedro> all targets have a name, e.g., target_shortname could be made a method Pedro> that returns the name of the currently topmost target in the stack Pedro> (not the squashed target). Yeah. The squashed target may still need to exist, or the debug target would have to be recast as a new stratum. >> 5. Any given to_* method implementation will be guaranteed to be called >> with the target_ops with which it was registered. (This rule is >> handy on multi-target, where I split out the target_ops vtable from >> the object itself.) FWIW I wrote a script to add all the missing "this" arguments -- not just to target.h but to every method implementation in the tree. This yields 103 patches -- one per converted method. (I may zap a few of these, the bulk of them seem to make sense...) I'm not quite sure how to submit it. I mean, email is doable, but it seems a bit large. >> This is a bit difficult since I don't have access to many targets. I'm >> not sure what to do about this aspect. Pedro> What I've done in that past for this sort of thing is just go ahead Pedro> and do the almost mechanical adjustment across the board, and don't Pedro> fret about it if something breaks. Publish git test branches, IOW, Pedro> make it very easy for people to test, report issues and hopefully Pedro> help with targets they care about should help drive this through Pedro> faster. Yeah. It doesn't quite sit right but it does seem like the best way. The nice thing about these refactorings is that the needed changes are usually trivial anyhow. Tom