From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11541 invoked by alias); 17 Jul 2014 16:40:46 -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 11471 invoked by uid 89); 17 Jul 2014 16:40:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 17 Jul 2014 16:40:41 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6HGedWU023683 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 17 Jul 2014 12:40:40 -0400 Received: from barimba (ovpn-113-27.phx2.redhat.com [10.3.113.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6HGecrJ013564 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 17 Jul 2014 12:40:38 -0400 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFC] auto-generate most target debug methods References: <1403208237-27023-1-git-send-email-tromey@redhat.com> <53C5042B.6080406@redhat.com> <87sim1z71y.fsf@fleche.redhat.com> <53C7E1D8.7060808@redhat.com> <87k37cx996.fsf@fleche.redhat.com> <53C7F7A8.8040505@redhat.com> Date: Thu, 17 Jul 2014 16:41:00 -0000 In-Reply-To: <53C7F7A8.8040505@redhat.com> (Pedro Alves's message of "Thu, 17 Jul 2014 17:19:52 +0100") Message-ID: <87d2d4x7ju.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: 2014-07/txt/msg00475.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: >> have extra arguments (I happened to see target_get_section_table). Pedro> Hmm, I think you might have looked at some other method. That Pedro> one's arguments seem to match. Sorry, I wasn't totally clear. That particular function takes a target_ops parameter -- but generally the target_* entry points do not. Pedro> But yeah, there's some missing uniformity here. E.g., Pedro> target_terminal_inferior is currently horrible for actually Pedro> bypassing calling the target method in some cases. target_detach Pedro> is another case that does extra work. Another somewhat related oddity in the current code is that some spots bypass these entry points, or at least seem to. Search for "current_target.beneath" outside of target.[ch] to see. Pedro> I was thinking simpler maintenance and clearer resulting code, by Pedro> enforcing the rule that the entry point does nothing more than Pedro> calling the target_ops method, to avoid surprises like Pedro> target_terminal_inferior. Yeah, ok. Well, that makes sense, it's just unclear to me if the cost/benefit ratio is in our favor here, given the apparent amount of inconsistency already in-tree. Tom