From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13118 invoked by alias); 5 May 2014 09:32:26 -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 13107 invoked by uid 89); 5 May 2014 09:32:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: glazunov.sibelius.xs4all.nl Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 05 May 2014 09:32:24 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id s459VpQK015516; Mon, 5 May 2014 11:31:51 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id s459Vnbu027141; Mon, 5 May 2014 11:31:50 +0200 (CEST) Date: Mon, 05 May 2014 09:32:00 -0000 Message-Id: <201405050931.s459Vnbu027141@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: arnez@linux.vnet.ibm.com CC: gdb-patches@sourceware.org, kevinb@redhat.com, yao@codesourcery.com In-reply-to: <8738gx6bc2.fsf@br87z6lw.de.ibm.com> (message from Andreas Arnez on Mon, 28 Apr 2014 11:40:45 +0200) Subject: Re: [RFC 02/23] Remove 'arch' field from regset structure References: <87eh0h6bkq.fsf@br87z6lw.de.ibm.com> <8738gx6bc2.fsf@br87z6lw.de.ibm.com> X-SW-Source: 2014-05/txt/msg00035.txt.bz2 > From: Andreas Arnez > > Removes the 'arch' field from the regset structure, since it > represents the only "dynamic" data in a regset. It was referenced in > some regset supply- and collect routines, to get access to the gdbarch > associated with the regset. Naturally, the affected routines always > have access to the regcache to be supplied to or collected from. Thus > the gdbarch associated with that regcache can be used instead. > > gdb/ > * regset.h (struct regset): Remove gdbarch field. > * regset.c (regset_alloc): Drop initialization of gdbarch field. > * nios2-linux-tdep.c (nios2_core_regset): Likewise. > * ppcfbsd-tdep.c (ppc32_fbsd_gregset, ppc64_fbsd_gregset): > Likewise. > * ppc-linux-tdep.c (ppc32_linux_gregset, ppc64_linux_gregset) > (ppc32_linux_fpregset, ppc32_linux_vrregset) > (ppc32_linux_vsxregset): Likewise. > * i386obsd-tdep.c (i386obsd_aout_supply_regset): Get the gdbarch > via the regcache instead of the regset. > * i386-tdep.c (i386_supply_gregset, i386_collect_gregset) > (i386_supply_fpregset, i386_collect_fpregset): Likewise. > * amd64obsd-tdep.c (amd64obsd_supply_regset): Likewise. > * amd64-tdep.c (amd64_supply_fpregset, amd64_collect_fpregset): > Likewise. The > - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); > + const struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache)); changes make the lines too long. I suggest changing them to: struct gdbarch *gdbarch = get_regcache_arch (regcache); const struct gdbarch_tdep *tdep = gdbarch_tdep(gdbarch); Otherwise, this change is fine with me.