Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: xdje42@gmail.com (Doug Evans)
Cc: gdb-patches@sourceware.org (gdb-patches@sourceware.org)
Subject: Re: [PATCH] Remove only use of current_inferior ()->gdbarch outside of gdbarch.*
Date: Mon, 31 Aug 2015 14:02:00 -0000	[thread overview]
Message-ID: <20150831140140.871648126@oc7340732750.ibm.com> (raw)
In-Reply-To: <CAP9bCMT7Pn2v09n7_M=YkUJNk+QSRDaYEoLdnQWnmhNQ=0=rsQ@mail.gmail.com> from "Doug Evans" at Aug 28, 2015 12:16:44 PM

Doug Evans wrote:
> On Fri, Aug 28, 2015 at 10:21 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> > Doug Evans wrote:
> >> On Thu, Aug 27, 2015 at 10:15 PM, Doug Evans <xdje42@gmail.com> wrote:
> >> > 2015-08-27  Doug Evans  <xdje42@gmail.com>
> >> >
> >> >         * 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


  reply	other threads:[~2015-08-31 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28  5:16 Doug Evans
2015-08-28 15:04 ` Doug Evans
2015-08-28 17:22   ` Ulrich Weigand
2015-08-28 19:16     ` Doug Evans
2015-08-31 14:02       ` Ulrich Weigand [this message]
2015-09-20 19:52         ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150831140140.871648126@oc7340732750.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=xdje42@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox