From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34836 invoked by alias); 23 Aug 2017 10:33:13 -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 34821 invoked by uid 89); 23 Aug 2017 10:33:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=disconnected, H*r:sk:static. X-HELO: mail-io0-f175.google.com Received: from mail-io0-f175.google.com (HELO mail-io0-f175.google.com) (209.85.223.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Aug 2017 10:33:11 +0000 Received: by mail-io0-f175.google.com with SMTP id y4so5879773iod.4 for ; Wed, 23 Aug 2017 03:33:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=84xUWcoXvPr9CsubBuY5Bt1ZN9BTsch3u1Dzpd+tZvI=; b=BwuiW+k3itrGPHm1MN7AbebQCn9dJOCbdTYUgPCbhqJ9XS0tdSJqIHotgdccZy4sB0 TkdpCDGGofGmWuP0B6X1/8TsrR6umNILzTzVlCYc34OzpoDZRkCg+ruh0O/pQBfmjpIt 6XWRSZb9g/jroheQMChpYJ4aby78PfcHhttFkOwuzKXgVjBrGydubRlowqhSIy4kNSG+ xuFNk3fWIVuGb95NJdCLUIoCurVnZR1eHjJXhtdIsABYipP1QIsgwcXb9POcNwOYFpqo EMZ216yx2jlpukgRb+ZhU4Y7BP67CaLMG4ZmIx5yRK7nuOX7u2Lsx1+tzcjvj28pjouO Ug8g== X-Gm-Message-State: AHYfb5hPY6iU6ZGZuidOQ6RpufgiRsV2c83Bumzp1e7MiGODVEKAEzMn TNzZVYnDBCqr+Ktw X-Received: by 10.107.55.198 with SMTP id e189mr1760408ioa.34.1503484389284; Wed, 23 Aug 2017 03:33:09 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id i30sm50181iod.88.2017.08.23.03.33.07 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 23 Aug 2017 03:33:08 -0700 (PDT) From: Yao Qi To: Alan Hayward Cc: "gdb-patches\@sourceware.org" , nd Subject: Re: [PATCH 1/7] Regcache: Subclass ptid functionality to target_regcache References: <6AAAA989-5B31-4E54-963C-57F2B7452BD7@arm.com> Date: Wed, 23 Aug 2017 10:33:00 -0000 In-Reply-To: <6AAAA989-5B31-4E54-963C-57F2B7452BD7@arm.com> (Alan Hayward's message of "Thu, 17 Aug 2017 08:47:15 +0000") Message-ID: <86mv6qr2u9.fsf@gmail.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: 2017-08/txt/msg00437.txt.bz2 Alan Hayward writes: > All ptid related functions are moved to target_regcache. > What is the rationale of this change? The regcache is per-thread, even it is disconnected from target. > A regcache retains the ptid () method, which always returns -1. ptid_t (-1) is minus_one_ptid, which has a special meaning. > This ensures users can always test if a regcache is attached to a > target, without needing to know if it is a target_regcache. When do we need such test ("if a regcache is attached to a target")? --=20 Yao (=E9=BD=90=E5=B0=A7)