From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95282 invoked by alias); 23 Jan 2018 22:28:26 -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 95263 invoked by uid 89); 23 Jan 2018 22:28:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 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-qt0-f171.google.com Received: from mail-qt0-f171.google.com (HELO mail-qt0-f171.google.com) (209.85.216.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jan 2018 22:28:24 +0000 Received: by mail-qt0-f171.google.com with SMTP id x27so5566153qtm.12 for ; Tue, 23 Jan 2018 14:28:24 -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=6u45ePJA9XATlHijpsYQoDZZBIRJ6FzGM3deOcpgyEc=; b=X/012qMbc/jaKEpb+LyHIKaa510l87pZS9/xc7lHgAEhAczIDysx6pZDTum5TcGBCi 5F3CUp1hPAqvEshy74cxE5Tela1NsD0NvW6gJr29029StoLImwAdmhjo0x33Fe2jDT0+ UKYEgwxtdVkCKHzFfaqYP4hso1tsioFHXtEdraLXPu/i1WBNq5v6L940t3TgP3xFE1cr G55c6/CeK03nUf6S7bvUnVTiuJHFsyuB1urRbGui17faIE0tBXgMd4GAaspEQGBD/fZt DG/LusS/ynrfEj6vgiYjp7C+KFlj4EWBjixzP5QgdJFrQnhFNKRtUk/OioiPFV1WGD+Z sAQA== X-Gm-Message-State: AKwxytfczDZo04B+79wd+7ykLR30AxevBY/KBx68GzBIM/qXGXOktRNy V7lWX/ueF6FU/E7dJAfTVcXMUBOdSyb/N7ZtofQ= X-Google-Smtp-Source: AH8x225m+biNmh26E3AOtIid8FL9flxdehIqrPzFBiL1HxpQcHFIwNsCdf+G2qkWsQeAjX+C1mWMHjoKz+OYMUq/UZU= X-Received: by 10.200.26.69 with SMTP id q5mr5783040qtk.174.1516746502578; Tue, 23 Jan 2018 14:28:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.153.232 with HTTP; Tue, 23 Jan 2018 14:28:22 -0800 (PST) In-Reply-To: <94ef6e4d-50bd-9e17-e143-fe304ea829ee@ericsson.com> References: <1512125286-29788-1-git-send-email-yao.qi@linaro.org> <1512125286-29788-9-git-send-email-yao.qi@linaro.org> <94ef6e4d-50bd-9e17-e143-fe304ea829ee@ericsson.com> From: Yao Qi Date: Tue, 23 Jan 2018 22:28:00 -0000 Message-ID: Subject: Re: [PATCH 08/15] class regcache_read and Pass regcache_read to gdbarch methods To: Simon Marchi Cc: GDB Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00457.txt.bz2 On Tue, Jan 23, 2018 at 9:51 PM, Simon Marchi w= rote: > > Did you consider changing other gdbarch methods that only need to read the > registers? read_pc comes to mind, but there are perhaps others. > I didn't think about this, but you are right, other gdbarch methods can be changed too. read_pc and breakpoint_kind_from_current_state should use the right type of regcache which only has read methods. I'll do the change. >> regcache_read is an abstract base class, and it has a pure virtual >> function raw_update, because I don't want regcache_read know where these >> raw registers are from. They can be from either the target (readwrite >> regcache) or the regcache itself (readonly regcache). > > About the naming, I think that readcache_read sounds like a function (it > sounds like an action). Instinctively, I would call it readable_regcache. > If we take regcache_readonly into account too, we need some naming consistency here. We either use "readable_regcache/readonly_regcache" or "regcache_readable/regcache_readonly". I can choose the former scheme. --=20 Yao (=E9=BD=90=E5=B0=A7)