From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1836 invoked by alias); 9 Dec 2001 21:38:32 -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 1812 invoked from network); 9 Dec 2001 21:38:30 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 9 Dec 2001 21:38:30 -0000 Received: from rtl.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id NAA06745; Sun, 9 Dec 2001 13:38:27 -0800 (PST) Received: (from ezannoni@localhost) by rtl.cygnus.com (8.11.2/8.11.0) id fB9LiVt01481; Sun, 9 Dec 2001 16:44:31 -0500 X-Authentication-Warning: krustylu.cygnus.com: ezannoni set sender to ezannoni@cygnus.com using -f From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15379.56127.235381.439351@krustylu.cygnus.com> Date: Sun, 09 Dec 2001 13:38:00 -0000 To: Kevin Buettner Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA] ppc: include register numbers in gdbarch_tdep structure. In-Reply-To: <1011209212323.ZM18906@ocotillo.lan> References: <15379.50110.429092.453327@krustylu.cygnus.com> <1011209212323.ZM18906@ocotillo.lan> X-Mailer: VM 6.97 under Emacs 20.7.1 X-SW-Source: 2001-12/txt/msg00258.txt.bz2 Kevin Buettner writes: > On Dec 9, 3:04pm, Elena Zannoni wrote: > > > This is a new patch for > > > > http://sources.redhat.com/ml/gdb-patches/2001-12/msg00160.html > > > > Tested on aix4.3, solaris-x-powerpc-eabi, ppcnbsd, ppclinux. > > > > Elena > > > > 2001-12-09 Elena Zannoni > > > > * config/rs6000/tm-rs6000.h (STAB_REG_TO_REGNUM): Remove > > definition, it is now multiarched. > > * ppc-tdep.h (struct gdbarch_tdep): Move from rs6000-tdep.c. Add > > fields for special register numbers. > > * rs6000-tdep.c (rs6000_gdbarch_init): Initialize new tdep special > > regnum fields. > > (rs6000_saved_pc_after_call): Use gdbarch_tdep registers fields > > instead of hardcoded macros. > > (branch_dest, rs6000_pop_frame, rs6000_fix_call_dummy, > > ppc_push_return_address, rs6000_frame_saved_pc, > > frame_get_saved_regs, rs6000_frame_chain, > > rs6000_store_return_value): Ditto. > > (rs6000_stab_reg_to_regnum): New function. > > * ppcnbsd-nat.c (fetch_inferior_registers, > > store_inferior_registers, fetch_core_registers): Ditto. > > * ppc-linux-tdep.c (ppc_linux_in_sigtramp, > > ppc_linux_frame_init_saved_regs): Ditto. > > * ppc-linux-nat.c (ppc_register_u_addr, supply_gregset, > > fill_gregset): Ditto. > > * ppc-bdm.c (bdm_ppc_fetch_registers, bdm_ppc_store_registers): > > Ditto. > > Approved. > > Though I do wonder if it was really necessary to move register > numbers which are truly constant to the gdbarch_tdep struct. BTW, > this wouldn't bother me so much if we could use inline functions > in C. > > Kevin Thanks Kevin! Committed. The reason for moving the regnums to the tdep structure is that they are all in one place. It seems cleaner to have defintions like these be localized. I also found that in case of another processor, newer revisions moved the regs around a bit, so I had to multiarch them anyway. It seems like the ppc is a bit more stable in this regard though. Elena