From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118826 invoked by alias); 24 Jan 2018 09:43:02 -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 118810 invoked by uid 89); 24 Jan 2018 09:43:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 spammy=HX-Received:Wed X-HELO: mail-qt0-f193.google.com Received: from mail-qt0-f193.google.com (HELO mail-qt0-f193.google.com) (209.85.216.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Jan 2018 09:43:00 +0000 Received: by mail-qt0-f193.google.com with SMTP id z11so8734962qtm.3 for ; Wed, 24 Jan 2018 01:43:00 -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=wgbz9Sy6vIcLKOVYAJf37otUsbA2+GjuSRk0LGWm250=; b=ou6L3bWsyqFUlvxssrdnk3s2BtFxh1XXfpvbUl6TKGs+wbkcMsEyxtQ0l1MLNYK/Uf 3H1kIiKcvKtDptTDu6DOuFEjOTKuBjDqd8hLxv3KdQUftmkt38GofFDJV0q3WAPFRMNw uoTmCFpnwcfCQt9VJDIpyZNe33nF5c18XuxrkP3vVC8zcTmGQNLILxxsFDJ/2DVdG7We 5+sfyM829yWwQKxv6SopXNlv3PeaKxZF6QqTQQgBdt0gLBJRq5lQLE4hmX2ILpH+sxAG 0eKejD2cpra5mc74P4Kcq8AZctUegFp52r/9JRL9am40TYjJ+zkU2neonJfx0E2K6Xy3 1a6A== X-Gm-Message-State: AKwxytdr01HCa0WqzFrbR65SfZlFmELHqyzCKJVRbG/OhCEo9QUz8DOC 3kFl0Cekomvsj8NxPLzaReuCC4Lg0OVAd1ONOqM= X-Google-Smtp-Source: AH8x224KaA/DD+R3xMqvmsTMHs1hWgulqcBolWBnyLp8m8kD1Zs/NIQtjBRhz/eauqoc2Ww8Aar0s5FQmkP002RYlEo= X-Received: by 10.200.57.74 with SMTP id t10mr9159888qtb.22.1516786978827; Wed, 24 Jan 2018 01:42:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.153.232 with HTTP; Wed, 24 Jan 2018 01:42:58 -0800 (PST) In-Reply-To: References: <1512125286-29788-1-git-send-email-yao.qi@linaro.org> <1512125286-29788-11-git-send-email-yao.qi@linaro.org> From: Yao Qi Date: Wed, 24 Jan 2018 09:43:00 -0000 Message-ID: Subject: Re: [PATCH 10/15] Class regcache_readonly 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/msg00471.txt.bz2 On Wed, Jan 24, 2018 at 3:05 AM, Simon Marchi w= rote: > On 2017-12-01 05:48 AM, Yao Qi wrote: >> This patch adds a new class (type) for readonly regcache, which is >> created via regcache::save. regcache_readonly inherts from >> regcache_read. > > Hi Yao, > > Just a note about the naming. IIUC, the important thing about this > kind of regcache is that it's detached from any target. Did you > think about naming it detached_regcache or something like that ? > This kind of regcache is both detached and readonly. As I said in https://sourceware.org/ml/gdb-patches/2017-07/msg00031.html, detached and readonly are orthogonal in design. We have four different kinds of regcache, - readony detached regcache, this is what "class regcache_readonly" about. It has several uses, 1) record infcall state, 2) give a regcache view to frame, - read-write detached regcache, this is what "class reg_buffer_rw" about. It is used jit.c and record-full.c, where GDB keeps a detached regcache, but can read and write to it. - read-write attached regcache, that is what "class regcache" about. It is attached to target, read and write will go through target, - readonly attached regcache. It can be used for target 'core', but this piece is not included in this series, so in this patch series, "readonly" implies "detached". The major motivation of this patch series is to differentiate these kinds of regcache by different types, instead of by fields "m_readonly_p" or "m_detached_p" in "class regcache". --=20 Yao (=E9=BD=90=E5=B0=A7)