From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74288 invoked by alias); 31 Aug 2015 14:02:14 -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 74278 invoked by uid 89); 31 Aug 2015 14:02:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp10.uk.ibm.com Received: from e06smtp10.uk.ibm.com (HELO e06smtp10.uk.ibm.com) (195.75.94.106) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 31 Aug 2015 14:02:08 +0000 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 31 Aug 2015 15:02:04 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 31 Aug 2015 15:02:02 +0100 X-MailFrom: uweigand@de.ibm.com X-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 891F017D8024 for ; Mon, 31 Aug 2015 15:03:43 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t7VE1xWc20316196 for ; Mon, 31 Aug 2015 14:02:02 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t7VE1naU025005 for ; Mon, 31 Aug 2015 08:01:49 -0600 Received: from oc7340732750.ibm.com (dyn-9-152-213-24.boeblingen.de.ibm.com [9.152.213.24]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t7VE1nwr024617; Mon, 31 Aug 2015 08:01:49 -0600 Received: by oc7340732750.ibm.com (Postfix, from userid 500) id 871648126; Mon, 31 Aug 2015 16:01:40 +0200 (CEST) Subject: Re: [PATCH] Remove only use of current_inferior ()->gdbarch outside of gdbarch.* To: xdje42@gmail.com (Doug Evans) Date: Mon, 31 Aug 2015 14:02:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (gdb-patches@sourceware.org) In-Reply-To: from "Doug Evans" at Aug 28, 2015 12:16:44 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20150831140140.871648126@oc7340732750.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15083114-0041-0000-0000-000005724651 X-SW-Source: 2015-08/txt/msg00868.txt.bz2 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. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com