From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92648 invoked by alias); 20 Sep 2015 19:52: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 92637 invoked by uid 89); 20 Sep 2015 19:52:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f43.google.com Received: from mail-pa0-f43.google.com (HELO mail-pa0-f43.google.com) (209.85.220.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 20 Sep 2015 19:52:31 +0000 Received: by padhk3 with SMTP id hk3so96324046pad.3 for ; Sun, 20 Sep 2015 12:52:30 -0700 (PDT) X-Received: by 10.66.190.41 with SMTP id gn9mr14832800pac.0.1442778750110; Sun, 20 Sep 2015 12:52:30 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by smtp.gmail.com with ESMTPSA id y5sm4486995pbt.77.2015.09.20.12.52.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Sep 2015 12:52:29 -0700 (PDT) From: Doug Evans To: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (gdb-patches@sourceware.org) Subject: Re: [PATCH] Remove only use of current_inferior ()->gdbarch outside of gdbarch.* References: <20150831140140.871648126@oc7340732750.ibm.com> Date: Sun, 20 Sep 2015 19:52:00 -0000 In-Reply-To: <20150831140140.871648126@oc7340732750.ibm.com> (Ulrich Weigand's message of "Mon, 31 Aug 2015 16:01:40 +0200 (CEST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00494.txt.bz2 "Ulrich Weigand" writes: > Doug Evans wrote: >> On Fri, Aug 28, 2015 at 10:21 AM, Ulrich Weigand wrote: >> > Doug Evans wrote: >> >> On Thu, Aug 27, 2015 at 10:15 PM, Doug Evans wrote: >> >> > 2015-08-27 Doug Evans >> >> > >> >> > * ravenscar-thread.c (ravenscar_inferior_created): Replace >> >> > current_inferior ()->gdbarch with its wrapper target_gdbarch. >> > >> > Just as a quick comment: this goes exactly into the opposite direction >> > from what we discussed in the other thread. I think we should replace >> > target_gdbarch () with current_inferior ()->gdbarch *everywhere*, >> > instead of reverting that here ... >> >> This does nothing to fix the underlying problem, which is the >> referencing of global state instead obtaining the needed state >> (inferior, gdbarch, or whatever) from the passed in context. >> That's what I was talking about in the other thread at any rate. >> *In the mean time*, let's be consistent, and this patch is simpler. >> >> When we do go to properly fix this (or at least take the next step >> to properly fixing this), *then* we can go through and remove all >> the target_gdbarch calls. > > Well, OK. I guess I can see why we'd want to use target_gdbarch > consistently until it's eliminated completely ... I don't really > object to this patch, in any case. Committed, thanks.