From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14347 invoked by alias); 16 Oct 2004 01:08:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14313 invoked from network); 16 Oct 2004 01:08:28 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sourceware.org with SMTP; 16 Oct 2004 01:08:28 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 8566947D9A; Fri, 15 Oct 2004 18:08:27 -0700 (PDT) Date: Sat, 16 Oct 2004 01:08:00 -0000 From: Joel Brobecker To: Michael Snyder Cc: gdb-patches@sources.redhat.com, Kevin Buettner , jimb@redhat.com Subject: Re: [RFA] ppc/rs6000: use gdbarch_ps_regnum Message-ID: <20041016010827.GY1375@gnat.com> References: <41706E26.3050804@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41706E26.3050804@redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2004-10/txt/msg00289.txt.bz2 > I just happened to notice this. Gdbarch implements PS_REGNUM, > so there's no reason to keep it privately in the tdep struct. > 2004-10-15 Michael Snyder > > * ppc-tdep.h (struct gdbarch_tdep): Remove ppc_ps_regnum. > * rs6000-tdep.c (rs6000_gdbarch_init): Use set_gdbarch_ps_regnum > instead of putting it in the tdep struct. > * rs6000-nat.c: Use PS_REGNUM instead of the tdep. > * ppc-linux-nat.c: Ditto. > * ppc-linux-tdep.c: Ditto. > * aix-thread.c: Ditto. Seems good to me (pretty obvious actually), but I'd prefer it if Kevin approved it too. Give him a week, and then check it in. Currently testing on AIX 5.1 right now. Will send the results as soon as they are available. One tiny remark: > *************** rs6000_gdbarch_init (struct gdbarch_info > *** 3099,3105 **** > > tdep->ppc_gp0_regnum = 0; > tdep->ppc_toc_regnum = 2; > ! tdep->ppc_ps_regnum = 65; > tdep->ppc_cr_regnum = 66; > tdep->ppc_lr_regnum = 67; > tdep->ppc_ctr_regnum = 68; > --- 3099,3105 ---- > > tdep->ppc_gp0_regnum = 0; > tdep->ppc_toc_regnum = 2; > ! set_gdbarch_ps_regnum (gdbarch, 65); > tdep->ppc_cr_regnum = 66; > tdep->ppc_lr_regnum = 67; > tdep->ppc_ctr_regnum = 68; I would personally prefer the set_gdbarch_ps_regnum call to be moved slightly higher, where we set pc_regnum et al. What do you think? -- Joel