From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19043 invoked by alias); 14 Jul 2018 01:25:18 -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 19028 invoked by uid 89); 14 Jul 2018 01:25:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=accidentally 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; Sat, 14 Jul 2018 01:25:16 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 5557E1E48F; Fri, 13 Jul 2018 21:25:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=simark.ca; s=mail; t=1531531514; bh=I0VvrWgHNjmHGANrHVDUG22PesJ29Vqn87HehwjE+hs=; h=Subject:To:References:From:Date:In-Reply-To:From; b=XR1LkQ1vzhVk2gbTcOD8EMlsORFmBfyrioRU7scGhvghy7bfHDaDtIxJi/PTAyzwd cF76vObh8+ns7/oocgag6TNHnNIzNswkQkwcYy12uFPdZzLnxsSv7KahMUzyspUOuB dNcjFWeMSU6L3/DoKopk2vv6N3pDtbMnylw4waAo= Subject: Re: [RFA 08/13] Fix ravenscar-thread.c to use arch_ops To: Tom Tromey , gdb-patches@sourceware.org, Pedro Alves References: <20180712205208.32646-1-tom@tromey.com> <20180712205208.32646-9-tom@tromey.com> From: Simon Marchi Message-ID: <33ccd2d6-fbc2-c47a-2ebf-03a481fdd490@simark.ca> Date: Sat, 14 Jul 2018 01:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180712205208.32646-9-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-07/txt/msg00442.txt.bz2 On 2018-07-12 04:52 PM, Tom Tromey wrote: > The change to turn target ops into methods accidentally introduced a > bug in ravenscar-thread.c, changing some calls that were using > "arch_ops" to use the target beneath. > > This patch changes ravenscar-thread.c to use these variables where > appropriate. > > gdb/ChangeLog > 2018-07-12 Tom Tromey > > * ravenscar-thread.c (ravenscar_thread_target::store_registers): > Use arch_ops. > (ravenscar_thread_target::prepare_to_store): Likewise. > --- > gdb/ChangeLog | 6 ++++++ > gdb/ravenscar-thread.c | 4 ++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c > index 8bd31a5a725..e60fad87466 100644 > --- a/gdb/ravenscar-thread.c > +++ b/gdb/ravenscar-thread.c > @@ -442,7 +442,7 @@ ravenscar_thread_target::store_registers (struct regcache *regcache, > struct ravenscar_arch_ops *arch_ops > = gdbarch_ravenscar_ops (gdbarch); > > - beneath ()->store_registers (regcache, regnum); > + arch_ops->to_store_registers (regcache, regnum); > } > else > beneath ()->store_registers (regcache, regnum); > @@ -461,7 +461,7 @@ ravenscar_thread_target::prepare_to_store (struct regcache *regcache) > struct ravenscar_arch_ops *arch_ops > = gdbarch_ravenscar_ops (gdbarch); > > - beneath ()->prepare_to_store (regcache); > + arch_ops->to_prepare_to_store (regcache); > } > else > beneath ()->prepare_to_store (regcache); > It looks obvious to me, but let's ping Pedro just to be sure. Simon