From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15541 invoked by alias); 7 Nov 2014 16:54:25 -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 15532 invoked by uid 89); 7 Nov 2014 16:54:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f179.google.com Received: from mail-qc0-f179.google.com (HELO mail-qc0-f179.google.com) (209.85.216.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 07 Nov 2014 16:54:23 +0000 Received: by mail-qc0-f179.google.com with SMTP id o8so2728231qcw.38 for ; Fri, 07 Nov 2014 08:54:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=vLh1P86yJADgJTBvsjUsDpU7EkLXKQbdZJZTGjFnDLY=; b=MdsVXiiwCZYUr75rjJfEOrCj5hikRWDDADGkmHykCPQmrxPmgQFhX/cEO51EmZ7XZv S2hitztEU+hLVDefHf9P4psjCPIVFPZ6yoepEfwMqmeIsQEQfsbKV5N0ajy0xc7+aOXM Dbj7Du/px7aSF/QiRDtmN3pkBLi65JDGsJku4wLRULS2r6eeQq4mZBIqZKsnKE1rxnb5 5Zt3w3LABd7YnwXjK4JzIRq3JYSB4u7DNdMwk7NFRv/I2p9uUSZFEe7x5G/0qtnIz/kf cwDTmRlH5A9NHIxUR4Hy1+iTolAn7reg0x8P0FpnKcNAQZy8/M8O6llrN5aakoNP0mMI lS5Q== X-Gm-Message-State: ALoCoQnWqM7KZvctu0M171SBCVJ6yB69r4MPoCb7v00le6Wl/tfdGDEqSR+9DHcIJtNXVgnxtD5r MIME-Version: 1.0 X-Received: by 10.140.92.134 with SMTP id b6mr17707229qge.25.1415379261042; Fri, 07 Nov 2014 08:54:21 -0800 (PST) Received: by 10.229.250.4 with HTTP; Fri, 7 Nov 2014 08:54:20 -0800 (PST) In-Reply-To: <87fvdypgap.fsf@codesourcery.com> References: <1414195968-3333-1-git-send-email-yao@codesourcery.com> <1414195968-3333-3-git-send-email-yao@codesourcery.com> <21593.22575.941029.980760@ruffy2.mtv.corp.google.com> <87fvdypgap.fsf@codesourcery.com> Date: Fri, 07 Nov 2014 16:54:00 -0000 Message-ID: Subject: Re: [PATCH 2/6] DW attribute macro MACRO_AT_func and MACRO_AT_range From: Doug Evans To: Yao Qi Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00142.txt.bz2 On Tue, Nov 4, 2014 at 5:49 PM, Yao Qi wrote: > Doug Evans writes: > > Doug, > Thanks for reviewing these patches. > >> IWBN if one could add new macros simply by writing a new function. >> >> Can _handle_macro_attribute be rewritten such that >> MACRO_AT_{func,range} are themselves functions? > > I don't see any difficulties to implement MACRO_AT_{func,range} as > functions here, but could you tell me why do you prefer to do that? > Is it because they are macros? I was thinking long term I'd rather maintain the individual functions instead of one large switch statement, all else being equal, and if I have the choice. > After all, in dwarf assembler, all attributes are handled in a single > function, rather than the way that each attribute is handled in the > separate function. MACRO_AT_{func,range}, as special attributes from > the users' point of view, should be handled in a way consistent with > other attributes, IMO.