From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5735 invoked by alias); 15 Jul 2014 10:36:32 -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 5725 invoked by uid 89); 15 Jul 2014 10:36:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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; Tue, 15 Jul 2014 10:36:30 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6FAaSNk017186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 15 Jul 2014 06:36:29 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6FAaR6C027893; Tue, 15 Jul 2014 06:36:28 -0400 Message-ID: <53C5042B.6080406@redhat.com> Date: Tue, 15 Jul 2014 11:17:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFC] auto-generate most target debug methods References: <1403208237-27023-1-git-send-email-tromey@redhat.com> In-Reply-To: <1403208237-27023-1-git-send-email-tromey@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-07/txt/msg00368.txt.bz2 Hi Tom, I like the idea of this patch a lot. On 06/19/2014 09:03 PM, Tom Tromey wrote: > - void (*to_resume) (struct target_ops *, ptid_t, int, enum gdb_signal) > + void (*to_resume) (struct target_ops *, ptid_t, target_debug_step, > + enum gdb_signal) > TARGET_DEFAULT_NORETURN (noprocess ()); What I'm not sure I like is the need for new typedefs. Seems odd to me to have a textual mismatch between the declaration and all the implementations. Did you try an __attribute__(())-like approach? Something like: void (*to_resume) (struct target_ops *, ptid_t, int step TDP (print_target_resume_step), enum gdb_signal) TARGET_DEFAULT_NORETURN (noprocess ()); Parameters that have no explicit attribute would still fallback to type based printing. It'd be a way to override the default. Another similar idea, but written out of line: void (*to_resume) (struct target_ops *, ptid_t, int step, enum gdb_signal) TARGET_DEBUG_PRINT (step, print_target_resume_step) TARGET_DEFAULT_NORETURN (noprocess ()); ? -- Pedro Alves