From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8852 invoked by alias); 14 Nov 2014 01:00:04 -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 8840 invoked by uid 89); 14 Nov 2014 01:00:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Nov 2014 01:00:02 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1Xp5F0-0007D6-Qq from Yao_Qi@mentor.com ; Thu, 13 Nov 2014 16:59:58 -0800 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.181.6; Thu, 13 Nov 2014 16:59:58 -0800 From: Yao Qi To: Doug Evans CC: gdb-patches Subject: Re: [PATCH 2/6] DW attribute macro MACRO_AT_func and MACRO_AT_range 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> <87k333izfm.fsf@codesourcery.com> <87fvdqijal.fsf@codesourcery.com> Date: Fri, 14 Nov 2014 01:00:00 -0000 In-Reply-To: (Doug Evans's message of "Tue, 11 Nov 2014 23:01:14 -0800") Message-ID: <87sihmiol1.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00288.txt.bz2 Doug Evans writes: Hi Doug, > The sequence of ifs to test for each macro name is akin to the switch > statement we removed. > It's less code of course, but it still involves continual additions > for each new macro. > I was thinking of still having a wrapper function that checks for macros, > but it could do "info proc _handle_$attr_name" or some such and > call(via eval?) the function if it exists or flag an error if it > doesn't. We don't have to go down this road though until we need to. Yeah, that is a very clear trick. I'll adapt the code for it when new macro attribute is added later. Thanks for your review, and this series is pushed in. --=20 Yao (=E9=BD=90=E5=B0=A7)