This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Remove only use of current_inferior ()->gdbarch outside of gdbarch.*
- From: Doug Evans <xdje42 at gmail dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org (gdb-patches at sourceware dot org)
- Date: Sun, 20 Sep 2015 12:51:20 -0700
- Subject: Re: [PATCH] Remove only use of current_inferior ()->gdbarch outside of gdbarch.*
- Authentication-results: sourceware.org; auth=none
- References: <20150831140140 dot 871648126 at oc7340732750 dot ibm dot com>
"Ulrich Weigand" <firstname.lastname@example.org> writes:
> Doug Evans wrote:
>> On Fri, Aug 28, 2015 at 10:21 AM, Ulrich Weigand <email@example.com> wrote:
>> > Doug Evans wrote:
>> >> On Thu, Aug 27, 2015 at 10:15 PM, Doug Evans <firstname.lastname@example.org> wrote:
>> >> > 2015-08-27 Doug Evans <email@example.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.