From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101776 invoked by alias); 10 Mar 2017 17:51:56 -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 101763 invoked by uid 89); 10 Mar 2017 17:51:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=senses, HX-PHP-Originating-Script:rcube.php, site X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Mar 2017 17:51:53 +0000 Received: by simark.ca (Postfix, from userid 33) id A92D91E7DE; Fri, 10 Mar 2017 12:51:52 -0500 (EST) To: Ulrich Weigand Subject: Re: [PATCH 0/7] Pass ptid to target_ops register methods X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 10 Mar 2017 17:51:00 -0000 From: Simon Marchi Cc: simon.marchi@ericsson.com, palves@redhat.com, gdb-patches@sourceware.org In-Reply-To: <20170310171230.A9A22D806B1@oc3748833570.ibm.com> References: <20170310171230.A9A22D806B1@oc3748833570.ibm.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.3 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00140.txt.bz2 On 2017-03-10 12:12, Ulrich Weigand wrote: > Basically, we should move the above from the call site into all > implementations of the routine, and then push it down as far as > possible until it hopefully disappears in most cases. That makes senses. The good news is that this can be done incrementally, unlike the present patch series, which required changing the signature of methods used all over the place. At least one implentation of target_fetch/store_registers (bsd-uthread) needs to read or write memory, and therefore will need to save/restore inferior_ptid. But the big majority of them won't need to do it. > Yes, the target routines must only be called on a regcache that is > associated with a ptid. > > You'll probably need to add a get_regcache_ptid() routine or so; > that routine should assert that the regcache has a ptid. That sounds right. Thanks for the tips! Simon