From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6719 invoked by alias); 5 Jun 2009 18:41:30 -0000 Received: (qmail 6711 invoked by uid 22791); 5 Jun 2009 18:41:29 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Jun 2009 18:41:20 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MCeLt-0002qS-81 for gdb-patches@sources.redhat.com; Fri, 05 Jun 2009 18:41:17 +0000 Received: from 207.189.193.221 ([207.189.193.221]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Jun 2009 18:41:17 +0000 Received: from tromey by 207.189.193.221 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 Jun 2009 18:41:17 +0000 To: gdb-patches@sources.redhat.com From: Tom Tromey Subject: Re: Make target_ops->to_has_FOO functions instead of variables. Date: Fri, 05 Jun 2009 18:41:00 -0000 Message-ID: References: <200906041620.38550.pedro@codesourcery.com> Reply-To: tromey@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) X-IsSubscribed: yes 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 X-SW-Source: 2009-06/txt/msg00108.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> The patch below addresses this, by rewriting the target_has_FOO Pedro> properties as methods, so that they can return a different Pedro> result depending on the current inferior/program. Everything in there that I understand seems reasonable to me. Pedro> +extern int target_has_all_memory_1 (void); Pedro> +#define target_has_all_memory target_has_all_memory_1 () What do you think of a mechanical follow-up patch that changes "target_has_*" to "target_has_* ()"? I generally prefer to avoid object-like macros that expand to function calls, as I think they obscure the meaning of the code. Tom