From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81417 invoked by alias); 29 Jan 2018 16:54:33 -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 80591 invoked by uid 89); 29 Jan 2018 16:54:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qk0-f173.google.com Received: from mail-qk0-f173.google.com (HELO mail-qk0-f173.google.com) (209.85.220.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Jan 2018 16:54:32 +0000 Received: by mail-qk0-f173.google.com with SMTP id c69so6375411qkg.6 for ; Mon, 29 Jan 2018 08:54:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zb+lob+JKxNXRVnArGffauRQD+vNsqibUda3kc7Bv4w=; b=tjkoNnHHZJrCLq+CF+x71wE3JBluLmyNjyptewYxYd4R9LkQltIngSPTzekPA02wfY hM0X2ZhOrlxje/ztgDO+u0LggVMbwhdG3OEwh/Vz5OmH/vaBgPUMlm6SQUnpLK3TAtVA eFkGw12Ms3mR7vPH6ODt49IgPZDxv1p3KnqrWRoXD9UUrivJQUpmYXbKjtrWYwRxh1xz 2uVeSBedZc9WOEWt/KYErh2xEEagjwZfPyFFVsrDSUYkxM06wsZiszisUkOnP9SNM26t 5yWFnXysoBFfNdZuD50kmXKdrXUUZtAQMFFG2CqEQlH14kmTyQvBu5IbsII1a0DBnveq mU/Q== X-Gm-Message-State: AKwxyteH/WxxElIm1713HJ/1rbmGfA20ly7yeFnQypI2pzMo8arOWVHD OBS/K4NiZ8WoGlrO9rY8U5zpzrJW3Grei/Bgk8c= X-Google-Smtp-Source: AH8x224Nx7TYDc+JH3II571/c/17rzkqKYrFd26XUbpQhGRPK0EBQmA+uSSv26ztw55mYb6H46HdMDlEWHPuUd35LdU= X-Received: by 10.55.104.1 with SMTP id d1mr37846043qkc.71.1517244870298; Mon, 29 Jan 2018 08:54:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.153.232 with HTTP; Mon, 29 Jan 2018 08:54:29 -0800 (PST) In-Reply-To: References: <20180129102836.5d521e5f@ThinkPad> <707546ED-241F-4641-97A9-551C6FF0E7B4@arm.com> From: Yao Qi Date: Mon, 29 Jan 2018 16:54:00 -0000 Message-ID: Subject: Re: [PATCH] Use visitors for make_gdb_type To: Simon Marchi Cc: Alan Hayward , Philipp Rudo , Simon Marchi , "gdb-patches@sourceware.org" , nd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00602.txt.bz2 On Mon, Jan 29, 2018 at 4:12 PM, Simon Marchi w= rote: > > That seems like unnecessary boilerplate to me. I really don't see why cl= asses derived > from tdesc_element_visitor have to implement methods for nodes they don't= care about. > > I added Yao in CC so he can chime in. When I wrote tdesc_element_visitor, in my mind, it is an interface, so I expect child class implement all the methods, because at that moment, all methods are ne= eded, no empty methods. However, the situation changed a little bit, as per Alan's needs, part of the methods of tdesc_element_visitor are needed, and the rest of me= thods are empty somewhere. I don't mind converting tdesc_element_visitor into a = base class which has all these methods empty as a default. That is fine to me. By the way, Alan's approach is fine to me as well :) --=20 Yao (=E9=BD=90=E5=B0=A7)